Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove CI_MERGE_REQUEST_STATE as is not a Gitlab variable #1161

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

paolomainardi
Copy link
Contributor

@paolomainardi paolomainardi commented Aug 21, 2024

User description

As per the subject, the variable is not a default GitLab variable and must be removed.


PR Type

Bug fix, Documentation


Description

  • Removed the CI_MERGE_REQUEST_STATE variable from the GitLab CI job rule as it is not a default GitLab variable
  • Simplified the job rule to run PR-Agent on all merge request events, not just opened ones
  • Updated the documentation to reflect the changes in the GitLab CI configuration
  • This change ensures that PR-Agent will run on all merge request events, improving its coverage and effectiveness

Changes walkthrough 📝

Relevant files
Configuration changes
gitlab.md
Update GitLab CI job rule for PR-Agent                                     

docs/docs/installation/gitlab.md

  • Removed the condition $CI_MERGE_REQUEST_STATE == "opened" from the
    GitLab CI job rule
  • Simplified the job rule to only check if the pipeline source is a
    merge request event
  • +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @codiumai-pr-agent-pro codiumai-pr-agent-pro bot added documentation Improvements or additions to documentation Bug fix labels Aug 21, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🏅 Score: 95
    🧪 No relevant tests
    🔒 No security concerns identified
    🔀 No multiple PR themes
    ⚡ No key issues to review

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Refine the pipeline trigger condition to be more specific about when PR-Agent should run

    Consider adding more specific conditions to the rule to avoid unnecessary pipeline
    runs. For example, you might want to run PR-Agent only when the merge request is
    opened or updated.

    docs/docs/installation/gitlab.md [25-26]

     rules:
    -  - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    +  - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE =~ /(open|update)/'
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion improves the pipeline efficiency by adding more specific conditions, but it's not addressing a critical issue or bug.

    7

    @mrT23 mrT23 merged commit 91a7c08 into Codium-ai:main Aug 21, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Bug fix documentation Improvements or additions to documentation Review effort [1-5]: 1
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants