Skip to content

fix(bitbucketdatacenter): resolve tag commit before fetching config#6254

Closed
BillionClaw wants to merge 3 commits into
woodpecker-ci:mainfrom
BillionClaw:clawoss/fix/bitbucketdc-tag-events
Closed

fix(bitbucketdatacenter): resolve tag commit before fetching config#6254
BillionClaw wants to merge 3 commits into
woodpecker-ci:mainfrom
BillionClaw:clawoss/fix/bitbucketdc-tag-events

Conversation

@BillionClaw

Copy link
Copy Markdown

Annotated tags in Bitbucket Data Center use the tag object SHA as ToHash in webhooks, not the commit SHA. When a tag event arrived, the config fetcher tried to read `.woodpecker.yml` using the tag SHA, which failed because tag objects don't contain file content.

This change adds an explicit resolution step in the Hook handler that converts the tag SHA to the actual commit SHA before the config is fetched. Tag events now work regardless of which branch holds the pipeline config.

Fixes #6247

In Bitbucket Data Center, when using annotated tags, the webhook's ToHash
is the tag object SHA, not the actual commit SHA. This caused tag events
to fail when fetching the pipeline config because the config fetcher
would try to read the config file using the tag SHA instead of the
actual commit SHA.

This fix adds a resolveTagCommit step in the Hook handler that resolves
the tag SHA to the actual commit SHA BEFORE the config is fetched. This
ensures that tag events work correctly regardless of which branch the
pipeline config exists in.

Fixes woodpecker-ci#6247
@qwerty287

Copy link
Copy Markdown
Contributor

Thanks! Is the commit used to post the statuses still correct? I.e. the fix from #6203

@6543 6543 added bug Something isn't working forge/bitbucket bitbucket forge related feedback this needs feedback labels Mar 18, 2026
@woodpecker-bot

Copy link
Copy Markdown
Contributor

Account with automation patterns detected 🤖

@BillionClaw

We analyzed recent public events and found several patterns that are frequently associated with automated scripts or AI agents.

Human? 0% likely to be a human.

Signal Points Detail
Recently created +20 Account is 22 days old
Automated branch/PR workflow +35 16/22 branch creations followed by PRs within 86s
High PR volume +20 59 PRs in 10 days
Highly distributed activity +30 Activity spread across 30 external repositories

Have thoughts about this account? Let the community know.

🕵🏽 Analyzed 199 public events via AgentScan

@6543 6543 added the build_pr_images If set, the CI will build images for this PR and push to Dockerhub label Apr 4, 2026
@6543

6543 commented Apr 4, 2026

Copy link
Copy Markdown
Member

@dccdis as this bot is unlikely to return feedback ... but it is still a posibilety to have a working fix ... might wana look into it?

@dccdis

dccdis commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Cannot reproduce the bug on next-a7739a2bb7

@6543 6543 closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build_pr_images If set, the CI will build images for this PR and push to Dockerhub feedback this needs feedback forge/bitbucket bitbucket forge related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitbucket DC: tag events are ignored if no matching pipeline exists in the default branch

5 participants