diff --git a/.github/actions_scripts/test.py b/.github/actions_scripts/test.py index 10ef940..3d4e22b 100644 --- a/.github/actions_scripts/test.py +++ b/.github/actions_scripts/test.py @@ -37,8 +37,9 @@ def alicebot_test() -> None: if result.returncode != 0: msg = f"脚本执行失败: {result.stdout}" raise ValueError(msg) from None - except subprocess.TimeoutExpired: - raise + except subprocess.TimeoutExpired as e: + msg = f"脚本执行超时: {e.stdout}" + raise ValueError(msg) from e except subprocess.CalledProcessError as e: msg = f"Script execution failed with error code {e.returncode}" raise ValueError(msg) from e @@ -59,7 +60,7 @@ def get_meta_info() -> None: return author = metadata.get_all("Author") if author is None: - email = metadata.get_all("author_email") + email = metadata.get_all("Author-email") if email is not None and "<" in email[0]: # PDM发包问题 author = email[0].split("<")[0].strip() else: diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 44498f9..2c7cdfa 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -193,6 +193,17 @@ jobs: result: ${{ steps.test.outputs.result }} output: ${{ steps.test.outputs.output }} steps: + - name: Remove label parse-issue/failed + if: contains(github.event.issue.labels.*.name, 'parse-issue/failed') + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: ["parse-issue/failed"] + }) - uses: actions/checkout@v3 # Set up Python 3.8 environment - name: Set up Python 3.8