ci(workflow): enforce-pr-template

This commit is contained in:
Lemmy
2026-07-31 08:51:02 -04:00
parent 767fb29af0
commit dffd46ab4d
4 changed files with 377 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
name: Enforce Pull Request Template
on:
pull_request_target:
types:
- opened
- edited
- reopened
concurrency:
group: enforce-pr-template-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
issues: write
pull-requests: write
jobs:
enforce:
if: ${{ github.repository == 'noctalia-dev/community-plugins' }}
runs-on: ubuntu-latest
steps:
# pull_request_target has write access. Only execute this trusted script from
# the default branch; never check out or run code from the pull request head.
- name: Check out trusted enforcement code
uses: actions/checkout@v7
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Validate pull request description
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 .github/workflows/scripts/enforce-pr-template.py "$GITHUB_EVENT_PATH"