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

Autosquash can't squash commits that modify non-formula files #12939

Closed
2 tasks done
dpo opened this issue Feb 28, 2022 · 3 comments · Fixed by #12944
Closed
2 tasks done

Autosquash can't squash commits that modify non-formula files #12939

dpo opened this issue Feb 28, 2022 · 3 comments · Fixed by #12944
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@dpo
Copy link
Contributor

dpo commented Feb 28, 2022

brew config output

N/A: issue occurs on GitHub Actions VM

brew doctor output

N/A: issue occurs on GitHub Actions VM

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

Merge a PR in a tap by labeling it with "pr-pull". The PR in question only modifies the version of a formula: https://github.com/coin-or-tools/homebrew-coinor/pull/81/files

What happened (include all command output)?

The job fails with the error message

Error: Autosquash can't squash commits that modify non-formula files.

https://github.com/coin-or-tools/homebrew-coinor/runs/5365992002?check_suite_focus=true#step:4:20

What did you expect to happen?

Expected the bottles to be published and the PR to be merged.

Step-by-step reproduction instructions (by running brew commands)

The issue occurs in GitHub Actions on a tap, not by manually running brew commands.

The issue was reported here: https://github.com/Homebrew/discussions/discussions/3033
and I was advised to open an issue on this repository.
@dpo dpo added the bug Reproducible Homebrew/brew bug label Feb 28, 2022
@Bo98
Copy link
Member

Bo98 commented Feb 28, 2022

Specifically, the bug is that this line fails to take into account that formula files can lie outside of a Formula subdirectory (or in HomebrewFormula):

next if %r{^Formula/.*\.rb$}.match?(file)

@MikeMcQuaid
Copy link
Member

Specifically, the bug is that this line fails to take into account that formula files can lie outside of a Formula subdirectory (or in HomebrewFormula):

Given these commands exist primarily for our workflow: I'm tempted to say "we'll review a PR to fix this but don't plan on doing so ourselves" (unless you'd like to, @Bo98).

@carlocab
Copy link
Member

carlocab commented Mar 1, 2022

Given these commands exist primarily for our workflow: I'm tempted to say "we'll review a PR to fix this but don't plan on doing so ourselves"

The workaround also seems to be pretty straightforward: just move your formulae into a Formula or HomebrewFormula subdirectory.

Bo98 added a commit to Bo98/brew that referenced this issue Mar 1, 2022
Bo98 added a commit to Bo98/brew that referenced this issue Mar 1, 2022
Bo98 added a commit to Bo98/brew that referenced this issue Mar 1, 2022
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants