diff --git a/py/pipeline-workflow/check-draft-status.py b/py/pipeline-workflow/check-draft-status.py index c1bd2e091..8e37f3945 100644 --- a/py/pipeline-workflow/check-draft-status.py +++ b/py/pipeline-workflow/check-draft-status.py @@ -7,11 +7,40 @@ with open("unicodetools/data/ucd/dev/DerivedAge.txt", 'r') as f: version = f.readline().strip().replace("# DerivedAge-", "").replace(".0.txt", "") +PROVISIONALLY_ASSIGNED_AGE_NOTICE = f"""\ +While the Unicode Technical Committee has provisionally assigned these +characters, they have not been accepted for Unicode {version}, nor for any +specific version of Unicode. + +The Age property values for new characters are likely incorrect right +now. They will be recomputed after the UTC accepts their encoding and +this pull request is updated for the target version. +""".replace("\n", "%0A") + +UNREVIEWED_AGE_NOTICE = f"""\ +These characters are neither accepted for Unicode {version}, nor for any +specific version of Unicode, nor are they provisionally assigned. + + +The Age property values for new characters are likely incorrect right +now. They will be recomputed after the UTC accepts their encoding and +this pull request is updated for the target version. +""".replace("\n", "%0A") + if pipeline_label != "pipeline-" + version: with open(os.environ['GITHUB_EVENT_PATH'], 'r') as f: event = json.load(f) print(event) draft = event['pull_request']['draft'] + # Caution the reader that the Age values are placeholders. + if pipeline_label == "pipeline-provisionally-assigned": + print("::warning file=unicodetools/data/ucd/dev/DerivedAge.txt," + f"title=Not in the {version} pipeline::" + + PROVISIONALLY_ASSIGNED_AGE_NOTICE) + else: # Not even provisionally assigned. + print("::warning file=unicodetools/data/ucd/dev/DerivedAge.txt," + f"title=Not in the {version} pipeline::" + + UNREVIEWED_AGE_NOTICE) if not draft: print("::error title=PR must be draft::" "PRs for character additions must be draft unless approved for "