-
Notifications
You must be signed in to change notification settings - Fork 94
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: add prow like PR management #1903
Conversation
/assign zakisk |
/label feature |
/help |
🤖 Available Commands
|
b9ffa36
to
a215330
Compare
/lgtm |
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.
LGTM 👍
This add a Pac PipelineRun that enables managing PRs through GitHub comments, replacing Prow-like commands with Pipelines as Code. - `/assign user1 user2` → Assign users to a PR. - `/unassign user1 user2` → Remove assigned users from a PR. - `/label bug enhancement` → Add labels to a PR. - `/unlabel bug` → Remove specific labels from a PR. - `/lgtm` → Approve a PR with a comment. - `/help` → Posts a comment listing all supported commands in a markdown table. - Uses embedded Python in a Tekton Task to interact with the GitHub API. - Extracts GitHub token from `git_auth_secret` for authentication. - Parses `{{ trigger_comment }}` to determine the appropriate action. - Handles API errors with proper logging and graceful failures. - Supports both `POST` and `DELETE` requests for GitHub issue APIs. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@chmouel it would be better if LGTM comment by bot should be like this: |
removed the /lgtm since it's the bot (the owner of the token) that does it not the actual user, there is no way to do this properly i think, unless we implemente a full blown implementation of how prow does it, counting a minimal of /lgtm on a pr from approved users to approve the PR, but that is something for another time for someone else @zakisk ^^ |
This add a Pac PipelineRun that enables managing PRs through
GitHub comments, replacing Prow-like commands with Pipelines as Code.
/assign user1 user2
→ Assign users to a PR./unassign user1 user2
→ Remove assigned users from a PR./label bug enhancement
→ Add labels to a PR./unlabel bug
→ Remove specific labels from a PR./help
→ Posts a comment listing all supported commands in a markdown table.Uses embedded Python in a Tekton Task to interact with the GitHub API.
Extracts GitHub token from
git_auth_secret
for authentication.Parses
{{ trigger_comment }}
to determine the appropriate action.Handles API errors with proper logging and graceful failures.
Supports both
POST
andDELETE
requests for GitHub issue APIs.Signed-off-by: Chmouel Boudjnah chmouel@redhat.com