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

Fix BB ambiguous commit status key #4544

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

j04n-f
Copy link
Contributor

@j04n-f j04n-f commented Dec 9, 2024

Description

Bitbucket commit status depends on the status key (key=id). A status with the same key overwrites the previous status, even when the triggering event is different (e.g., pull_request or branch).

Problem

When pull_request and push events are enabled, the commit status is overwritten by the last workflow to finish (only when there's a PR open). This happens because both workflow keys are equal.

Solution

Set the key depending on the pipeline context, like the BB data center. Users can use BB settings to block their PRs depending on the workflow name.


image

Bitbucket commit status depends on the status key (key=id). A status with the same key overwrites the previous status, even when the triggering event is different (e.g. pull_request or branch). Set the key depending on the pipeline context.
@anbraten anbraten added bug Something isn't working server forge/bitbucket bitbucket forge related labels Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.26%. Comparing base (0136473) to head (bd23dc9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4544   +/-   ##
=======================================
  Coverage   28.26%   28.26%           
=======================================
  Files         399      399           
  Lines       28179    28179           
=======================================
  Hits         7966     7966           
  Misses      19507    19507           
  Partials      706      706           

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

@qwerty287 qwerty287 merged commit 21755be into woodpecker-ci:main Dec 9, 2024
9 checks passed
@woodpecker-bot
Copy link
Contributor

@woodpecker-bot woodpecker-bot mentioned this pull request Dec 9, 2024
1 task
@j04n-f j04n-f deleted the fix-commit-status-key branch December 9, 2024 16:08
j04n-f added a commit to j04n-f/woodpecker that referenced this pull request Dec 10, 2024
Co-authored-by: Joan Flotats <joanflotats@bit2me.com>
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 14, 2024
1 task
pat-s pushed a commit that referenced this pull request Dec 18, 2024
Co-authored-by: Joan Flotats <joanflotats@bit2me.com>
pat-s pushed a commit that referenced this pull request Dec 18, 2024
Co-authored-by: Joan Flotats <joanflotats@bit2me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forge/bitbucket bitbucket forge related server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants