自动标记 7 天不活跃的 Issue/PR 为 stale,自动关闭标记后 7 天仍不活跃的 PR #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check Pull Requests | |
# See also: .github/workflows/scripts | |
name: PR Check and Report | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- synchronize | |
- closed | |
jobs: | |
pr-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate checkbox # See pull_request_template.md | |
uses: roryq/checkmate@master | |
continue-on-error: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-: | |
- name: Setup Requirements | |
run: | | |
pip install -r scripts/requirements.txt | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
json: true | |
write_output_files: true | |
- name: Check and Report | |
run: | | |
python .github/workflows/scripts/check.py | |
env: | |
# scripts | |
github_api_token: ${{ secrets.GITHUB_TOKEN }} | |
EVENT_TYPE: ${{ github.event.action }} | |
IS_MERGED: ${{ github.event.pull_request.merged }} | |
# gh_cli | |
PR_NUMBER: ${{ github.event.number }} |