-
Notifications
You must be signed in to change notification settings - Fork 114
Fix ok-to-test comment issue for external user on GitHub #1899
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
Conversation
/test |
can we have a e2e test for this using github ? and same for unittest |
for e2e test, it needs 3 users one repo owner, one in owners file and one outsider. if we try it could be with users but still need an extra user. |
8678903
to
3bb8e9a
Compare
/retest |
/retest go-testing |
01cc8d7
to
7353cfd
Compare
Issue: when an external user sends a pull request on a repository PAC create a pending check-run but after ok-to-test comment from an authorized user if there is not matching PipelineRun on in the repositoy the pending status of the check-run created by PAC still there and it hinders pull request to be merged automatically if auto-merge is setup on the repository. Solution: If ok-to-test comment is sent on a pull request and there is no matching PipelineRun in .tekton directory then create neutral check-run on the pull request letting auto-merge work in its way. https://issues.redhat.com/browse/KONFLUX-6565 Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
/test |
When a repository owner issues the `/ok-to-test` command on a pull request raised by an unauthorized user, and no PipelineRun exists in the .tekton directory for `pull_request` event, | ||
Pipelines-as-Code will create a neutral check-run status. This status serves to indicate that no PipelineRun has been matched, preventing any workflows from being blocked such as auto-merge, will proceed as expected. | ||
|
||
{{< hint info >}} |
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.
we need to slow down on the hint everywhere..... it's fine now but next time let's just use a normal tone part of the documentation....
Issue: when an external user sends a pull request on a repository PAC create a pending check-run but after ok-to-test comment from an authorized user if there is not matching PipelineRun on in the repositoy the pending status of the check-run created by PAC still there and it hinders pull request to be merged automatically if auto-merge is setup on the repository.
Solution: If ok-to-test comment is sent on a pull request and there is no matching PipelineRun in .tekton directory then create neutral check-run on the pull request letting auto-merge work in its way.
https://issues.redhat.com/browse/KONFLUX-6565
Changes
Submitter Checklist
📝 Ensure your commit message is clear and informative. Refer to the How to write a git commit message guide. Include the commit message in the PR body rather than linking to an external site (e.g., Jira ticket).
♽ Run make test lint before submitting a PR to avoid unnecessary CI processing. Consider installing pre-commit and running pre-commit install in the repository root for an efficient workflow.
✨ We use linters to maintain clean and consistent code. Run make lint before submitting a PR. Some linters offer a --fix mode, executable with make fix-linters (ensure markdownlint and golangci-lint are installed).
📖 Document any user-facing features or changes in behavior.
🧪 While 100% coverage isn't required, we encourage unit tests for code changes where possible.
🎁 If feasible, add an end-to-end test. See README for details.
🔎 Address any CI test flakiness before merging, or provide a valid reason to bypass it (e.g., token rate limitations).
If adding a provider feature, fill in the following details:
(update the documentation accordingly)