-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
style: don't allow patches to be PR/MR urls #8075
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
Conversation
|
Shall we make merged PRs exempt from that audit? |
Either that or fix them up before this is merged. Note this could also be a RuboCop, I think, which would be preferable. |
|
I'd rather get them fixed first since I don't think you can tell if a PR is closed without making an API call and it's better for people to be in the habit of not using PR diffs in my opinion. Doing it as a RuboCop does make more sense, I'll make that switch. |
|
I've moved the check into a RuboCop and included the sample output below. Quickly looking at some of them, Style output$ brew style homebrew/core == adios2.rb == C: 32: 10: https://github.com/ornladios/ADIOS2/pull/2305.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == assimp.rb == C: 24: 12: https://github.com/assimp/assimp/pull/1634.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == caffe.rb == C: 35: 10: https://github.com/BVLC/caffe/pull/6638.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == conjure-up.rb == C:110: 12: https://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/75.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == ctl.rb == C: 22: 10: https://github.com/ampas/CTL/pull/73.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. C: 27: 10: https://github.com/ampas/CTL/pull/74.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == etcd.rb == C: 21: 10: https://github.com/etcd-io/etcd/pull/11937.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == fontforge.rb == C: 39: 10: https://github.com/fontforge/fontforge/pull/4258.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == gitless.rb == C: 70: 10: https://github.com/gitless-vcs/gitless/pull/230.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == h3.rb == C: 19: 10: https://github.com/uber/h3/pull/362.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == hashpump.rb == C: 21: 10: https://github.com/bwall/HashPump/pull/14.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == include-what-you-use.rb == C: 21: 10: https://github.com/include-what-you-use/include-what-you-use/pull/807.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == john-jumbo.rb == C: 37: 10: https://github.com/magnumripper/JohnTheRipper/pull/4101.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == komposition.rb == C: 36: 10: https://github.com/owickstrom/komposition/pull/102.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == libcapn.rb == C: 30: 10: https://github.com/adobkin/libcapn/pull/46.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == mtr.rb == C: 25: 10: https://github.com/traviscross/mtr/pull/315.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == nyancat.rb == C: 18: 10: https://github.com/klange/nyancat/pull/34.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == ooniprobe.rb == C:145: 12: https://github.com/pynetwork/pypcap/pull/79.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == pinentry-mac.rb == C: 23: 10: https://github.com/GPGTools/pinentry-mac/pull/7.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == scalapack.rb == C: 22: 10: https://github.com/Reference-ScaLAPACK/scalapack/pull/23.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == shellinabox.rb == C: 22: 10: https://github.com/shellinabox/shellinabox/pull/467.diff?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == squashfs.rb == C: 29: 10: https://github.com/plougher/squashfs-tools/pull/69.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == telegram-cli.rb == C: 29: 10: https://github.com/vysheng/tg/pull/1306.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == terraformer.rb == C: 20: 10: https://github.com/GoogleCloudPlatform/terraformer/pull/535.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. == tfenv.rb == C: 19: 12: https://github.com/tfutils/tfenv/pull/181.patch?full_index=1 is s a PR diff whose contents may change. Please link directly to a commit hash. |
In support of Homebrew/brew#8075
|
When is submitting a patch to formula-patches desired over an inline patch? If it's something concrete, can rubocop suggest submitting a patch there when applicable? |
|
I don't think we have any formal guidance on it. If it's a bunch of patches in a series like e.g. Homebrew/homebrew-core#58583 then that might be a good idea. But I don't know if that's a real audit that we could apply consistently. |
This is a combo patch derived from the 7 individual commits in shellinabox/shellinabox#467, while resolving several "already-patched" rejections in one of the original commits. In support of Homebrew/brew#8075
|
Yeah, probably not. It sounds 1. relatively rare and 2. very obvious to maintainers who can suggest when it's needed |
This is a combo patch derived from the 7 individual commits in shellinabox/shellinabox#467, while resolving several "already-patched" rejections in one of the original commits. In support of Homebrew/brew#8075 Co-authored-by: Adrian Ho <[email protected]>
In support of Homebrew/brew#8075 Co-authored-by: Adrian Ho <[email protected]>
In support of Homebrew/brew#8075 Also make test match a specific version tag, instead of spewing the entire version list for visual confirmation.
In support of Homebrew/brew#8075
Original patchset: fontforge/fontforge#4258 In support of Homebrew/brew#8075
In support of Homebrew/brew#8075 Also make test match a specific version tag, instead of spewing the entire version list for visual confirmation. Co-authored-by: Adrian Ho <[email protected]>
In support of Homebrew/brew#8075 Co-authored-by: Adrian Ho <[email protected]>
Original patchset: fontforge/fontforge#4258 In support of Homebrew/brew#8075 Co-authored-by: Adrian Ho <[email protected]>
In support of Homebrew/brew#8075
In support of Homebrew/brew#8075 Co-authored-by: Adrian Ho <[email protected]>
jonchang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's checking for GitLab URLs now too? Looks good! 👍 from me once brew style is green on homebrew/core.
|
Hmm, not sure why CI is failing. Everything being flagged as an error has already been merged into |
|
It's failing on the Linux side. The changes have all been merged into homebrew-core but haven't been merged into linuxbrew-core yet (a manual process that's done by one of the linux maintainers at least once per day). There's some more info here. I usually just wait for them to be merged (usually no longer than a day) but if you wanted to fix it more quickly you could look into doing the merge yourself. I've never done it but there are instructions at the link. |
|
There were two |
brew stylewith your changes locally?brew testswith your changes locally?Having a patch be a PR url is risky because the contents of the PR may change. This prevents linking directly to PRs. The following formulae in the core taps currently have direct links to PRs/MRs: