Merge pull request #9134 from Rylan12/pr-pull-ci-cyntax-only
pr-pull: skip bottles for CI-syntax-only PRs
This commit is contained in:
commit
76ef45fac7
@ -285,8 +285,9 @@ module Homebrew
|
|||||||
Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", *commits, verbose: args.verbose?, resolve: args.resolve?)
|
Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", *commits, verbose: args.verbose?, resolve: args.resolve?)
|
||||||
end
|
end
|
||||||
|
|
||||||
def formulae_need_bottles?(tap, original_commit, args:)
|
def formulae_need_bottles?(tap, original_commit, user, repo, pr, args:)
|
||||||
return if args.dry_run?
|
return if args.dry_run?
|
||||||
|
return false if GitHub.pull_request_labels(user, repo, pr).include? "CI-syntax-only"
|
||||||
|
|
||||||
changed_formulae(tap, original_commit).any? do |f|
|
changed_formulae(tap, original_commit).any? do |f|
|
||||||
!f.bottle_unneeded? && !f.bottle_disabled?
|
!f.bottle_unneeded? && !f.bottle_disabled?
|
||||||
@ -394,7 +395,7 @@ module Homebrew
|
|||||||
args: args)
|
args: args)
|
||||||
end
|
end
|
||||||
|
|
||||||
unless formulae_need_bottles?(tap, original_commit, args: args)
|
unless formulae_need_bottles?(tap, original_commit, user, repo, pr, args: args)
|
||||||
ohai "Skipping artifacts for ##{pr} as the formulae don't need bottles"
|
ohai "Skipping artifacts for ##{pr} as the formulae don't need bottles"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|||||||
@ -779,4 +779,9 @@ module GitHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pull_request_labels(user, repo, pr)
|
||||||
|
pr_data = open_api(url_to("repos", user, repo, "pulls", pr))
|
||||||
|
pr_data["labels"].map { |label| label["name"] }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user