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

Use the merge request branch on merge requests #1687

Merged
merged 3 commits into from
Sep 17, 2021

Conversation

carlallen
Copy link
Contributor

When a pipeline runs on a merge request it should tag the branch of the merge request

When a pipeline runs on a merge request it should tag the branch of the merge request
@juan-fernandez
Copy link
Contributor

thanks for the great catch and contribution @carlallen! This logic is indeed flawed and we need to fix it across languages.

Upon further inspection, though, it seems we may have an even better solution:

CI_COMMIT_REF_NAME might be a good candidate: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/ci/pipeline.rb#L831
Here we see that it's the ref or the source branch if it's a merge request: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/ci/pipeline.rb#L1164-1170.

We'll test this and get back to you.

Thanks again!

@carlallen
Copy link
Contributor Author

carlallen commented Sep 16, 2021

I've updated my PR. I'll update my patch in my project and see if that works there too.

Copy link
Contributor

@juan-fernandez juan-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this @carlallen !

@ivoanjo ivoanjo merged commit f05a273 into DataDog:master Sep 17, 2021
@github-actions github-actions bot added this to the 0.53.0 milestone Sep 17, 2021
@marcotc marcotc added ci-app CI product for test suite instrumentation community Was opened by a community member labels Sep 27, 2021
@marcotc
Copy link
Member

marcotc commented Oct 6, 2021

@carlallen, thank you again for your contribution. 0.53.0 was just released, including the changes in this PR!

@carlallen
Copy link
Contributor Author

TNX!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-app CI product for test suite instrumentation community Was opened by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants