-
Notifications
You must be signed in to change notification settings - Fork 101
fix: /ok-to-test /retest pipelineruns should not be created if last sha successful #2048
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?
fix: /ok-to-test /retest pipelineruns should not be created if last sha successful #2048
Conversation
fa2a595
to
72e4aca
Compare
/cancel |
579fd77
to
7508871
Compare
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
pkg/pipelineascode/pipelineascode.go:196
- [nitpick] Consider renaming the variable 'existingPRs' (later in the block) to 'existingRuns' or similar to more clearly indicate that it represents a collection of PipelineRun objects.
labelSelector := fmt.Sprintf("%s=%s", keys.SHA, formatting.CleanValueKubernetes(p.event.SHA))
/retest |
8f5c0ab
to
b44e208
Compare
cc @chmouel seems like the provider e2e tests are not running :/ wanted to test them, not sure what's up |
cc @zakisk |
_, _, err := g.Provider.Client.Issues.CreateComment(ctx, g.Options.Organization, g.Options.Repo, g.PRNumber, | ||
&ghlib.IssueComment{Body: ghlib.Ptr("/retest")}) | ||
// Wait for the first pipeline run to be created | ||
time.Sleep(5 * time.Second) |
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.
@zakisk i think you created a utility function for that?
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.
not me, but there is func for this UntilPipelineRunCreated
c112c4a
to
2ff4ccc
Compare
…ha successful when executing /ok-to-test or /retest gitops commands, check whether the last pipelinerun created for the same SHA was successful. If the run was successful, skip new pipelinerun creation
2ff4ccc
to
a3e227e
Compare
Changes
when executing /ok-to-test or /retest gitops commands, check whether
the last pipelinerun created for the same SHA was successful. If the
run was successful, skip new pipelinerun creation
fixes #1959
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 provider documentation accordingly)