|
7 | 7 | with open("unicodetools/data/ucd/dev/DerivedAge.txt", 'r') as f: |
8 | 8 | version = f.readline().strip().replace("# DerivedAge-", "").replace(".0.txt", "") |
9 | 9 |
|
| 10 | +PROVISIONALLY_ASSIGNED_AGE_NOTICE = f"""\ |
| 11 | +While the Unicode Technical Committee has provisionally assigned these |
| 12 | +characters, they have not been accepted for Unicode {version}, nor for any |
| 13 | +specific version of Unicode. |
| 14 | +
|
| 15 | +The Age property values for new characters are likely incorrect right |
| 16 | +now. They will be recomputed after the UTC accepts their encoding and |
| 17 | +this pull request is updated for the target version. |
| 18 | +""".replace("\n", "%0A") |
| 19 | + |
| 20 | +UNREVIEWED_AGE_NOTICE = f"""\ |
| 21 | +These characters are neither accepted for Unicode {version}, nor for any |
| 22 | +specific version of Unicode, nor are they provisionally assigned. |
| 23 | +
|
| 24 | +
|
| 25 | +The Age property values for new characters are likely incorrect right |
| 26 | +now. They will be recomputed after the UTC accepts their encoding and |
| 27 | +this pull request is updated for the target version. |
| 28 | +""".replace("\n", "%0A") |
| 29 | + |
10 | 30 | if pipeline_label != "pipeline-" + version: |
11 | 31 | with open(os.environ['GITHUB_EVENT_PATH'], 'r') as f: |
12 | 32 | event = json.load(f) |
13 | 33 | print(event) |
14 | 34 | draft = event['pull_request']['draft'] |
| 35 | + # Caution the reader that the Age values are placeholders. |
| 36 | + if pipeline_label == "pipeline-provisionally-assigned": |
| 37 | + print("::warning file=unicodetools/data/ucd/dev/DerivedAge.txt," |
| 38 | + f"title=Not in the {version} pipeline::" + |
| 39 | + PROVISIONALLY_ASSIGNED_AGE_NOTICE) |
| 40 | + else: # Not even provisionally assigned. |
| 41 | + print("::warning file=unicodetools/data/ucd/dev/DerivedAge.txt," |
| 42 | + f"title=Not in the {version} pipeline::" + |
| 43 | + UNREVIEWED_AGE_NOTICE) |
15 | 44 | if not draft: |
16 | 45 | print("::error title=PR must be draft::" |
17 | 46 | "PRs for character additions must be draft unless approved for " |
|
0 commit comments