Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Dec 20, 2023
1 parent 9983450 commit d61a95a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion py/pipeline-workflow/check-draft-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
print(event)
draft = event['pull_request']['draft']
if not draft:
print("::error title=PR must be draft::PRs for character additions must be draft unless approved for the upcoming version of Unicode.")
print("::error title=PR must be draft::"
"PRs for character additions must be draft unless approved for "
"the upcoming version of Unicode.")
exit(1)
4 changes: 3 additions & 1 deletion py/pipeline-workflow/check-l2-document.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
print(event)
pr_body = event['pull_request']['body']
if not re.search(r"L2/\d\d-\d\d\d", pr_body):
print("::error title=Need proposal document::PRs for character additions must include a link to an L2 document in the PR description.")
print("::error title=Need proposal document::"
"PRs for character additions must include a link to an L2 document in"
" the PR description.")
exit(1)
4 changes: 3 additions & 1 deletion py/pipeline-workflow/check-utc-decision.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
print(event)
pr_body = event['pull_request']['body']
if not re.search(r"UTC-\d\d\d-[MC]\d", pr_body):
print("::error title=Need UTC decision::PRs for approved or provisionally assigned must include a link to a UTC decision.")
print("::error title=Need UTC decision::"
"PRs for approved or provisionally assigned must include a link to a "
"UTC decision.")
exit(1)
8 changes: 5 additions & 3 deletions py/pipeline-workflow/compare-repertoire.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
labels = event['pull_request']['labels']
pipeline_labels = [label for label in labels if label['name'].startswith('pipeline-')]
if not pipeline_labels:
print("::error title=Missing pipeline label::PRs for character additions must have a pipeline label.")
print("::error title=Missing pipeline label::"
"PRs for character additions must have a pipeline label.")
exit(1)
if len(pipeline_labels) > 1:
print("::error title=Multiple pipeline labels::Only one pipeline-* label must be applied.")
print("::error title=Multiple pipeline labels::"
"Only one pipeline-* label must be applied.")
exit(1)
label = pipeline_labels[0]
print("Labeled", label)
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
print("pipeline-label=" + label['name'], file=f)
print("pipeline-label=" + label['name'], file=f)

0 comments on commit d61a95a

Please sign in to comment.