-
Notifications
You must be signed in to change notification settings - Fork 41
Add GitHub workflows for automatic PR labeling for needs-review and needs-changes #1974
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
base: main
Are you sure you want to change the base?
Conversation
- Add needs-review workflow: automatically labels non-draft PRs without WIP in title (excludes red-hat-konflux) - Add needs-changes workflow: manages review status labels based on PR reviews and comments - Removes needs-review when any review is submitted - Adds needs-changes for non-approved reviews - Removes needs-changes when lgtm label is added - Allows manual needs-changes labeling via comments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Allow users to manually add needs-review label by commenting "needs-review" or "/needs-review" on PRs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Add explicit permissions for issues and pull-requests write access to resolve "Resource not accessible by integration" errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
/needs-review |
/hold |
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.
test
/needs-changes |
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.
/needs-changes
Hi @jotak - I need some help with this, I am always facing 403 error with log, do I need some kind of permissions with new github workflows, based on what I read it should always run with
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1974 +/- ##
==========================================
+ Coverage 71.02% 71.22% +0.19%
==========================================
Files 75 75
Lines 10011 10011
==========================================
+ Hits 7110 7130 +20
+ Misses 2513 2498 -15
+ Partials 388 383 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Convert both workflow files to use gh CLI instead of actions/github-script for label management: - needs-review.yaml: Use gh pr edit for adding/removing needs-review labels - needs-changes.yaml: Use gh pr edit for managing needs-changes labels based on review state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
/needs-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.
/needs-changes
/needs-changes |
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.
/needs-changes
Replace actions/checkout with GH_REPO environment variable to avoid "fatal: not a git repository" errors. This approach matches the existing pr-labels.yaml workflow and is more efficient. Changes: - Remove actions/checkout@v4 steps from all jobs - Replace GITHUB_TOKEN with GH_TOKEN - Add GH_REPO environment variable for repository context 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
/needs-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.
/needs-changes
/needs-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.
/needs-changes
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.
/needs-changes
- Remove restrictive fork condition that was causing steps to be skipped - Add comprehensive debugging output to diagnose event and condition issues - Make PR condition more explicit with != null check - Ensure proper permissions are set on all jobs This should resolve: 1. needs-changes.yaml steps being skipped 2. needs-review.yaml not executing on "/needs-review" comments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
/needs-review |
/needs-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.
/needs-changes
Summary
Changes
needs-review.yaml: Automatically adds "needs-review" label to non-draft PRs (excludes red-hat-konflux author and WIP titles)
needs-changes.yaml: Manages review status labels:
I performed self-review of the code changes - Mehul Modi
Test plan
🤖 Generated with Claude Code