mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Fix label search when no pr defined
This commit is contained in:
parent
e855952d50
commit
91d52c2a79
1 changed files with 5 additions and 6 deletions
11
tools/ci.py
11
tools/ci.py
|
@ -1526,13 +1526,12 @@ def workflow_config(
|
|||
)
|
||||
ctx.exit(1)
|
||||
|
||||
if "pull_request" not in gh_event:
|
||||
if "pull_request" in gh_event:
|
||||
pr = gh_event["pull_request"]["number"]
|
||||
labels = _get_pr_test_labels_from_event_payload(gh_event)
|
||||
else:
|
||||
labels = []
|
||||
ctx.warn("The 'pull_request' key was not found on the event payload.")
|
||||
ctx.exit(1)
|
||||
|
||||
pr = gh_event["pull_request"]["number"]
|
||||
labels = _get_pr_test_labels_from_event_payload(gh_event)
|
||||
|
||||
ctx.info(f"{'==== labels ====':^80s}")
|
||||
ctx.info(f"{pprint.pformat(labels)}")
|
||||
ctx.info(f"{'==== end labels ====':^80s}")
|
||||
|
|
Loading…
Add table
Reference in a new issue