fix(bitbucketdatacenter): support on-comment annotation for non-gitops comments - #2911
Conversation
f8d00a8 to
9290433
Compare
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2911 +/- ##
==========================================
- Coverage 80.68% 80.66% -0.02%
==========================================
Files 164 164
Lines 13907 13889 -18
==========================================
- Hits 11221 11204 -17
+ Misses 1966 1965 -1
Partials 720 720
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9290433 to
cd7d1a7
Compare
|
/ok-to-test |
|
please squash your commits into one and we're good to go after comments resolution... |
|
@zakisk we should help contributors instead of waiting weeks for smalls things, since we can push to their branches |
76240bf to
5b60259
Compare
|
/ok-to-test |
|
/lgtm |
There was a problem hiding this comment.
Congrats @tricktron your PR Has been approved 🎉
✅ Pull Request Approved
Approval Status:
- Required Approvals: 1
- Current Approvals: 2
👥 Reviewers Who Approved:
| Reviewer | Permission Level | Approval Status |
|---|---|---|
| @zakisk | write |
✅ |
| @chmouel | admin |
✅ |
📝 Next Steps
- Ensure all required checks pass
- Comply with branch protection rules
- Request a maintainer to merge using the
/mergecommand (or merge it
directly if you have repository permission).
Automated by the PAC Boussole 🧭
I was about to do it today 🙂 |
5b60259 to
fc28517
Compare
fc28517 to
f5b2fc7
Compare
|
/ok-to-test |
f5b2fc7 to
e5e4a0a
Compare
e5e4a0a to
6f96589
Compare
|
/ok-to-test |
6f96589 to
391269a
Compare
|
@zakisk I had to add pr:open to the tests to test the gating of the comments. Can you rerun the ci? |
391269a to
f15dbd4
Compare
|
/ok-to-test |
|
/retest |
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
f15dbd4 to
1b44359
Compare
|
/ok-to-test |
|
/retest |
| @@ -111,25 +112,8 @@ func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http. | |||
| processedEvent.TriggerTarget = triggertype.PullRequest | |||
| processedEvent.EventType = triggertype.PullRequest.String() | |||
| } else if provider.Valid(eventType, []string{"pr:comment:added", "pr:comment:edited"}) { | |||
There was a problem hiding this comment.
This seems inconsistent with the PR description "Drop pr:comment:edited: Removed from parsePayloadType and ParsePayload.",
There was a problem hiding this comment.
@theakshaypant Thanks for the headsup. Yes, we decided not to remove that and I updated / removed that part from the description just now.
|
@tricktron test |
@tricktron no worries I think it's not your PR I see that its failing on other PRs as well I will take a look. this is good to merge after that. thanks |
|
/test go-testing |
📝 Description of the Change
Bitbucket Data Center silently drops non-gitops PR comments (
pr:comment:addedevents that are not/test,/retest,/ok-to-test, or/cancel). This means theon-commentPipelineRun annotation never triggers on Bitbucket DC, while it works on GitHub, GitLab, and Gitea.Additional Refactorings
Remove dead guards in
Detect: TheIsTestRetestComment,IsOkToTestComment, andIsCancelCommentchecks all returned the same result as the catch-all. Stripped them out.Detectjust decides whether to process an event;ParsePayloadhandles classification viaSetEventTypeAndTargetPR.Fix
EventTypefor bare gitops commands:/test→test-all-comment,/retest→retest-all-comment,/cancel→cancel-all-commentThis means bare
/retestnow correctly goes throughfilterSuccessfulTemplates(only re-runs failed pipelines), matching all other providers.🔗 Linked GitHub Issue
Fixes #2910
🧪 Testing Strategy
I could not test the E2E because I don´t have the infrastructure set-up for it. So I am relying on the CI for that one.
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.