Skip to content

Commit 2875ce7

Browse files
committed
update actions
1 parent 58e3fa9 commit 2875ce7

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/validate-issues.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
issues: write
1919

2020
steps:
21+
- name: Checkout Repository
22+
id: checkout
23+
uses: actions/checkout@v4
24+
2125
- name: Install GitHub CLI
2226
run: sudo apt-get install gh
2327

@@ -32,12 +36,6 @@ jobs:
3236
env:
3337
GH_TOKEN: ${{ github.token }}
3438

35-
# This is required to access the repository's files. Specifically, the
36-
# issue forms template and the additional validation configuration.
37-
- name: Checkout Repository
38-
id: checkout
39-
uses: actions/checkout@v4
40-
4139
# Install Node.js on the runner.
4240
- name: Setup Node.js
4341
id: setup-node
@@ -56,7 +54,7 @@ jobs:
5654
uses: issue-ops/parser@v4
5755
with:
5856
body: ${{ github.event.issue.body }}
59-
issue-form-template: T3_new_translator.yml
57+
issue-form-template: T3_new_translator.yaml
6058
workspace: ${{ github.workspace }}
6159

6260
# Validate the parsed issue body against the issue form template. This
@@ -65,12 +63,14 @@ jobs:
6563
id: validate
6664
uses: issue-ops/validator@v3
6765
with:
68-
issue-form-template: T3_new_translator.yml
66+
issue-form-template: T3_new_translator.yaml
6967
parsed-issue-body: ${{ steps.parse.outputs.json }}
7068
workspace: ${{ github.workspace }}
7169

72-
- name: Output Validation Results
73-
id: output
70+
- name: Handle Validation Errors
71+
if: ${{ steps.validate.outputs.errors != '' }}
7472
run: |
75-
echo "Result: ${{ steps.validate.outputs.result }}"
76-
echo "Errors: ${{ steps.validate.outputs.errors }}"
73+
gh issue comment ${{ github.event.issue.number }} --body "请仔细阅读 issue 模板中的说明。"
74+
gh issue edit ${{ github.event.issue.number }} --add-label invalid --state closed
75+
env:
76+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)