-
Notifications
You must be signed in to change notification settings - Fork 116
feat: Exclude tag push events from skip-pr-commits logic #2301
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
feat: Exclude tag push events from skip-pr-commits logic #2301
Conversation
Summary of ChangesHello @zakisk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the behavior of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 PR Lint Feedback
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly implements the feature to exclude tag push events from the skip-pr-commits logic. The changes are straightforward and the added tests cover the new functionality. I've added a few suggestions to improve maintainability and strengthen the tests. Overall, great work!
40226fc to
b046d1e
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly implements the feature to exclude tag push events from the skip-pr-commits logic, ensuring that release tags always trigger pipelines. The implementation in pkg/provider/github/parse_payload.go is clear and effective. The documentation in docs/content/docs/install/settings.md is updated accordingly, and the new test cases in pkg/provider/github/parse_payload_test.go properly cover the new behavior. I have one minor suggestion to improve the clarity of a test case name for better maintainability.
b046d1e to
73ef4af
Compare
|
This sounds good to me but really need a E2E, would you have time to do this before release next week or we could add a jira ticket to track this for next |
73ef4af to
23a4226
Compare
added E2E test |
23a4226 to
b48c7a4
Compare
When the skip-pr-commits setting is enabled, the system skips push events for commits that are part of an open pull request to avoid duplicate pipeline runs. However, this should not apply to tag push events, as tags represent important release points that should always trigger pipelines regardless of PR status. Changes: - Detect tag push events by checking if ref starts with "refs/tags/" - Exclude tag push events from skip logic even when skip-pr-commits setting is enabled - Add test case verifying tag push events are not skipped - Add test case verifying regular push events are still skipped when commit is part of a PR This ensures that tagging a commit (e.g., for releases) always triggers the associated pipeline runs, while still avoiding duplicate runs for regular branch commits that are part of pull requests. Signed-off-by: Zaki Shaikh <[email protected]>
b48c7a4 to
0b3f1e9
Compare
When the skip-pr-commits setting is enabled, the system skips push events for commits that are part of an open pull request to avoid duplicate pipeline runs. However, this should not apply to tag push events, as tags represent important release points that should always trigger pipelines regardless of PR status.
Changes:
This ensures that tagging a commit (e.g., for releases) always triggers the associated pipeline runs, while still avoiding duplicate runs for regular branch commits that are part of pull requests.
📝 Description of the Change
👨🏻 Linked Jira
https://issues.redhat.com/browse/SRVKP-9111
🔗 Linked GitHub Issue
Fixes #
🚀 Type of Change
fix:)feat:)feat!:,fix!:)docs:)chore:)refactor:)enhance:)deps:)🧪 Testing Strategy
🤖 AI Assistance
If you have used AI assistance, please provide the following details:
Which LLM was used?
Extent of AI Assistance:
Important
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Gemini [email protected]
Co-authored-by: ChatGPT [email protected]
Co-authored-by: Claude [email protected]
Co-authored-by: Cursor [email protected]
Co-authored-by: Copilot [email protected]
**💡You can use the script
./hack/add-llm-coauthor.shto automatically addthese co-author trailers to your commits.
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.