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

bump-formula-pr: check duplicate PRs as early as possible #8022

Merged
merged 1 commit into from
Jul 19, 2020

Conversation

SeekingMeaning
Copy link
Contributor

@SeekingMeaning SeekingMeaning commented Jul 17, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

As discussed in #8011, this PR changes brew bump-formula-pr to check for any duplicate PRs as early as possible, i.e. right after determining the formula and the tap in which it's contained.

This allows brew bump-formula-pr to exit early and not have to download anything before checking for duplicate PRs.

Example usages:

When an open duplicate PR is found:

% bump-formula clamav --version 0.102.4
Error: These pull requests may be duplicates:
clamav: add libtool dependency https://github.com/Homebrew/homebrew-core/pull/57734
Duplicate PRs should not be opened. Use --force to override this error.

When a closed duplicate PR is found:

% bump-formula convox --version 3.0.32
Error: These pull requests may be duplicates:
convox 3.0.32 https://github.com/Homebrew/homebrew-core/pull/58044
Duplicate PRs should not be opened. Use --force to override this error.

Other misc. changes:

@SeekingMeaning SeekingMeaning changed the title bump-formula-pr: check open PRs as early as possible bump-formula-pr: check duplicate PRs as early as possible Jul 17, 2020
@SeekingMeaning SeekingMeaning marked this pull request as draft July 17, 2020 04:35
@SeekingMeaning SeekingMeaning force-pushed the bump-check-early branch 2 times, most recently from 4a9a68d to 45f0419 Compare July 18, 2020 03:56
@SeekingMeaning SeekingMeaning marked this pull request as ready for review July 18, 2020 03:56
@SeekingMeaning SeekingMeaning force-pushed the bump-check-early branch 2 times, most recently from 80d587b to 5f9d5bd Compare July 18, 2020 04:05
@jonchang
Copy link
Contributor

Thanks @SeekingMeaning!

@jonchang jonchang merged commit a4b4c52 into Homebrew:master Jul 19, 2020
@SeekingMeaning SeekingMeaning deleted the bump-check-early branch July 19, 2020 03:40
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Good idea, I like the idea of avoiding wasting time!


def check_all_pull_requests(formula, tap_full_name, version: nil, url: nil, tag: nil)
version ||= Version.detect(url, tag ? { tag: tag } : {})
Copy link
Member

Choose a reason for hiding this comment

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

Could this be extracted into another variable? The ? usage is a bit hard to parse.

@SeekingMeaning SeekingMeaning mentioned this pull request Jul 20, 2020
6 tasks
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 23, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants