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

Correctly save to activestate.yaml the branch name for the given commit ID. #3206

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Apr 1, 2024

BugDX-2658 Activate by commitID from different then main branch saved incorrectly in as.yaml file

@mitchell-as mitchell-as changed the title Correctly save to activestate.yaml the branch name for the given comm… Correctly save to activestate.yaml the branch name for the given commit ID. Apr 1, 2024
@mitchell-as mitchell-as requested a review from MDrakos April 1, 2024 21:18
@mitchell-as mitchell-as marked this pull request as ready for review April 1, 2024 21:18
Copy link
Member

@MDrakos MDrakos left a comment

Choose a reason for hiding this comment

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

Looks good! Just a thought in the comments.

// Fetch the branch the given commitID is on.
case commitID != nil:
for _, b := range pj.Branches {
if belongs, err := model.CommitBelongsToBranch(ns.Owner, ns.Project, b.Label, *commitID, r.auth); err == nil && belongs {
Copy link
Member

Choose a reason for hiding this comment

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

It's unfortunate the number of API calls we're going to have to make in order to determine this. I did some poking around the VCS API and didn't see anything. It may be worth asking if something exists for this use case, but I doubt it so I'll leave it up to you.

@mitchell-as mitchell-as merged commit a1c4c0d into version/0-44-0-RC1 Apr 2, 2024
7 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-2658 branch April 2, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants