issue-policy.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Issue policy
  2. on:
  3. pull_request:
  4. types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review, review_requested]
  5. pull_request_review:
  6. types: [submitted]
  7. permissions:
  8. contents: read
  9. issues: read
  10. pull-requests: read
  11. jobs:
  12. policy:
  13. name: Issue policy
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Check out trusted policy
  17. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
  18. with:
  19. ref: ${{ github.event.repository.default_branch }}
  20. persist-credentials: false
  21. - name: Create Project read token
  22. id: app-token
  23. if: ${{ github.event.pull_request.user.type != 'Bot' && github.event.pull_request.user.type != 'App' }}
  24. uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
  25. with:
  26. client-id: ${{ vars.DSH_ISSUE_APP_CLIENT_ID }}
  27. private-key: ${{ secrets.DSH_ISSUE_APP_PRIVATE_KEY }}
  28. owner: deepseek-harness
  29. repositories: deepseek-harness
  30. permission-issues: read
  31. permission-organization-projects: read
  32. - name: Validate pull request
  33. if: ${{ github.event.pull_request.user.type != 'Bot' && github.event.pull_request.user.type != 'App' }}
  34. env:
  35. GITHUB_TOKEN: ${{ github.token }}
  36. PROJECT_TOKEN: ${{ steps.app-token.outputs.token }}
  37. run: node .github/issue-management/policy.mjs pr