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 PR pipeline ref #3985

Merged
merged 5 commits into from
Aug 2, 2024
Merged

Fix BB PR pipeline ref #3985

merged 5 commits into from
Aug 2, 2024

Conversation

j04n-f
Copy link
Contributor

@j04n-f j04n-f commented Jul 26, 2024

Description

To set the CI_COMMIT_PULL_REQUEST environment variable Woodpecker uses the following regexp:

params["CI_COMMIT_PULL_REQUEST"] = pullRegexp.FindString(m.Curr.Commit.Ref)

pullRegexp = regexp.MustCompile(`\d+`)

The environment variable returns a blank string because the regexp can't find an integer. Fix the reference using the pull request ID.

Test

The workflow reference link successfully redirects the user to the PR.

@6543 6543 enabled auto-merge (squash) July 27, 2024 01:27
@6543 6543 added bug Something isn't working forge/bitbucket bitbucket forge related labels Jul 27, 2024
@j04n-f
Copy link
Contributor Author

j04n-f commented Jul 30, 2024

@6543 CI fails seems to not be related to the changes. Do you know what is happening?

@6543 6543 merged commit 2d6e1ea into woodpecker-ci:main Aug 2, 2024
7 checks passed
@woodpecker-bot
Copy link
Collaborator

@woodpecker-bot woodpecker-bot mentioned this pull request Jul 30, 2024
1 task
@j04n-f j04n-f deleted the fix-bb-pipeline-ref branch August 5, 2024 07:18
6543 pushed a commit to 6543-forks/woodpecker that referenced this pull request Sep 5, 2024
@woodpecker-bot woodpecker-bot mentioned this pull request Sep 8, 2024
1 task
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants