Skip to content
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: auto-cancel PipelineRuns on PR close #1867

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Dec 16, 2024

Changes

The pipelinesascode.tekton.dev/cancel-in-progress: "true" feature
annotation has now been enhanced to include automatic cancellation of
PipelineRuns when the associated pull request is closed or merged.

Jira: https://issues.redhat.com/browse/SRVKP-6908

Signed-off-by: Chmouel Boudjnah [email protected]

Submitter Checklist

  • 📝 Please ensure your commit message is clear and informative. For guidance on crafting effective commit messages, refer to the How to write a git commit message guide. We prefer the commit message to be included in the PR body itself rather than a link to an external website (ie: Jira ticket).
  • ♽ Before submitting a PR, run make test lint to avoid unnecessary CI processing. For an even more efficient workflow, consider installing pre-commit and running pre-commit install in the root of this repository.
  • ✨ We use linters to maintain clean and consistent code. Please ensure you've run make lint before submitting a PR. Some linters offer a --fix mode, which can be executed with the command make fix-linters (ensure markdownlint and golangci-lint tools are installed first).
  • 📖 If you're introducing a user-facing feature or changing existing behavior, please ensure it's properly documented.
  • 🧪 While 100% coverage isn't a requirement, we encourage unit tests for any code changes where possible.
  • 🎁 If feasible, please check if an end-to-end test can be added. See README for more details.
  • 🔎 If there's any flakiness in the CI tests, don't necessarily ignore it. It's better to address the issue before merging, or provide a valid reason to bypass it if fixing isn't possible (e.g., token rate limitations).

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 60.67416% with 35 lines in your changes missing coverage. Please review.

Project coverage is 65.71%. Comparing base (7db78c0) to head (ff7c7be).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/provider/github/parse_payload.go 50.00% 6 Missing and 3 partials ⚠️
pkg/pipelineascode/cancel_pipelineruns.go 86.04% 4 Missing and 2 partials ⚠️
pkg/pipelineascode/pipelineascode.go 0.00% 4 Missing and 2 partials ⚠️
pkg/provider/gitea/parse_payload.go 0.00% 3 Missing ⚠️
pkg/provider/github/detect.go 0.00% 2 Missing and 1 partial ⚠️
pkg/provider/github/status.go 0.00% 3 Missing ⚠️
pkg/provider/gitlab/parse_payload.go 25.00% 2 Missing and 1 partial ⚠️
pkg/pipelineascode/match.go 0.00% 1 Missing ⚠️
pkg/reconciler/reconciler.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1867      +/-   ##
==========================================
- Coverage   65.74%   65.71%   -0.04%     
==========================================
  Files         178      178              
  Lines       13836    13886      +50     
==========================================
+ Hits         9097     9125      +28     
- Misses       4124     4144      +20     
- Partials      615      617       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chmouel chmouel force-pushed the SRVKP-6908-add-support-for-cancel-in-progress-when-pull-request-is-closedmerged branch 13 times, most recently from 47f1470 to 5de31a6 Compare December 18, 2024 15:24
@chmouel
Copy link
Member Author

chmouel commented Dec 18, 2024

/test go-testing

@chmouel chmouel force-pushed the SRVKP-6908-add-support-for-cancel-in-progress-when-pull-request-is-closedmerged branch from ff7c7be to ba4e927 Compare December 19, 2024 15:02
The pipelinesascode.tekton.dev/cancel-in-progress: "true" feature
annotation has now been enhanced to include automatic cancellation of
PipelineRuns when the associated pull request is closed or merged.

Jira: https://issues.redhat.com/browse/SRVKP-6908

Signed-off-by: Chmouel Boudjnah <[email protected]>
@chmouel chmouel force-pushed the SRVKP-6908-add-support-for-cancel-in-progress-when-pull-request-is-closedmerged branch from ba4e927 to 3495b53 Compare December 20, 2024 16:44
TBC on Monday the christmas FML

Signed-off-by: Chmouel Boudjnah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant