Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Dec 18, 2023
1 parent 539e688 commit 53607db
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,29 @@ jobs:
for label in labels:
if label['name'].startswith('pipeline-'):
print("Labeled", label)
with open(os.environ['GITHUB_OUTPUT'], 'r') as f:
print("pipeline-label=" + label['name'], file=f)
exit(0)
print("::error file=unicodetools/data/ucd/dev/UnicodeData.txt,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)
EOF
draft-unless-approved:
needs: labels-for-repertoire-changes
if: needs.labels-for-repertoire-changes.outputs.pipeline-label != 'pipeline-16.0'
name: Draft unless approved
runs-on: ubuntu-latest
steps:
- env:
PIPELINE_LABEL: ${{needs.labels-for-repertoire-changes.outputs.pipeline-label}}
run: |
python3 <<EOF
import os, json
with open(os.environ['GITHUB_EVENT_PATH'], 'r') as f:
event = json.load(f)
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.")
exit(1)
EOF

0 comments on commit 53607db

Please sign in to comment.