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

formulae_detect: use the first parent of GITHUB_SHA #907

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Apr 14, 2023

Unfortunately, GITHUB_SHA is the same as origin/master inside a
merge group, so we end up with diff_start_sha1 and diff_end_sha1
pointing to the same (merge) commit.

See, for example: Homebrew/homebrew-core@2ad18dc

Unfortunately, `GITHUB_SHA` is the same as `origin/master` inside a
merge group, so we end up with `diff_start_sha1` and `diff_end_sha1`
pointing to the same (merge) commit.

See, for example:

    Homebrew/homebrew-core@2ad18dc
@MikeMcQuaid
Copy link
Member

Unfortunately, GITHUB_SHA is the same as origin/master inside a
merge group

So origin/master is already set to the commit that will be merged rather than the last commit that was merged? Does this still apply if a git fetch is done?

Regardless: I still don't think this is the correct fix here, I'm afraid.

@carlocab
Copy link
Member Author

So origin/master is already set to the commit that will be merged rather than the last commit that was merged? Does this still apply if a git fetch is done?

It would seem so, yes. Let's try a git fetch first.

Regardless: I still don't think this is the correct fix here, I'm afraid.

Perhaps, but picking up some formulae still seems better than picking up none.

@carlocab
Copy link
Member Author

Ah, wait, no, origin_ref here will be the name of the temporary merge group branch, so it makes sense for that to be the same as GITHUB_SHA, and not be the same as origin/master.

@MikeMcQuaid
Copy link
Member

so it makes sense for that to be the same as GITHUB_SHA, and not be the same as origin/master.

Cool. Checking origin/HEAD should be the right fix here, then 👍🏻

@carlocab
Copy link
Member Author

#908

@carlocab carlocab closed this Apr 14, 2023
@carlocab carlocab deleted the fix-merge-group-again branch April 14, 2023 13:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants