Skip to content

audit whether GitHub prerelease or not#7231

Merged
MikeMcQuaid merged 6 commits intoHomebrew:masterfrom
hyuraku:audit_github-prerelease_or_not
Apr 13, 2020
Merged

audit whether GitHub prerelease or not#7231
MikeMcQuaid merged 6 commits intoHomebrew:masterfrom
hyuraku:audit_github-prerelease_or_not

Conversation

@hyuraku
Copy link
Copy Markdown
Contributor

@hyuraku hyuraku commented Mar 28, 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?

Solve #7177
Audit whether formula is GitHub prerelease or not

Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
when %r{^https://github.com/}
_, owner = URI.parse(stable.url).path.split("/")
tag = stable.specs[:tag] || stable.version.to_s
if GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{stable.full_name}/releases/tags/#{tag}")["prerelease"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to handle if this URL isn't found. You can reproduce this locally by editing the URL and ensuring it doesn't fail with a known-bad URL.

@bayandin
Copy link
Copy Markdown
Contributor

I would also suggest checking if a tag/release marked as draft.

@MikeMcQuaid MikeMcQuaid changed the title audit whether GitHub prerelease ot not audit whether GitHub prerelease or not Apr 1, 2020
Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
Comment thread Library/Homebrew/dev-cmd/audit.rb Outdated
@MikeMcQuaid MikeMcQuaid force-pushed the audit_github-prerelease_or_not branch from 5a387cf to afa5713 Compare April 12, 2020 13:51
@MikeMcQuaid MikeMcQuaid merged commit 2200b1e into Homebrew:master Apr 13, 2020
@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks @hyuraku!

@hyuraku hyuraku deleted the audit_github-prerelease_or_not branch April 13, 2020 08:19
@bayandin bayandin mentioned this pull request Apr 15, 2020
6 tasks
@lock lock bot added the outdated PR was locked due to age label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 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.

5 participants