diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 3295b17..1f78b81 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -4,7 +4,6 @@ version: 'v0.0.3' workflows: '.github/workflows/conventional-commits.yml': - - 'actions/create-github-app-token@v3.3.0' - 'ytanikin/pr-conventional-commits@1.5.2' '.github/workflows/deploy-mkdocs.yml': - 'actions/checkout@v7.0.1' @@ -27,11 +26,6 @@ dependencies: commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' owner_id: 44036562 repo_id: 197814629 - 'actions/create-github-app-token@v3.3.0': - ref: 'v3.3.0' - commit: 'sha1-64ab729a6294000f5aa4a4bc0b73d1f32bc45510' - owner_id: 44036562 - repo_id: 642580244 'actions/download-artifact@v8.0.2': ref: 'v8.0.2' commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333' diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 2366263..03cdaeb 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -1,22 +1,20 @@ name: PR Conventional Commit Validation on: - pull_request_target: + pull_request: types: [opened, synchronize, reopened, edited] +permissions: {} + jobs: validate-pr-title: runs-on: ubuntu-latest + permissions: + pull-requests: write # add the type label, creating it if missing steps: - - uses: actions/create-github-app-token@v3.3.0 - id: app-token - with: - client-id: ${{ secrets.DS_RELEASE_BOT_ID }} - private-key: ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }} - permission-pull-requests: write - - name: PR Conventional Commit Validation uses: ytanikin/pr-conventional-commits@1.5.2 with: task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]' - token: ${{ steps.app-token.outputs.token }} + # Fork PRs get a read-only token, so labeling would fail the check. + add_label: ${{ github.event.pull_request.head.repo.full_name == github.repository }}