proposal_ready.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. # Applies the "proposal rfc" label when a proposal is marked ready for review.
  5. name: Proposal ready for review
  6. on:
  7. pull_request_target:
  8. types:
  9. - ready_for_review
  10. permissions:
  11. pull-requests: write # For gh to edit labels.
  12. jobs:
  13. proposal_ready:
  14. if: contains(github.event.pull_request.labels.*.name, 'proposal')
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Harden Runner
  18. uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
  19. with:
  20. disable-sudo: true
  21. egress-policy: block
  22. # prettier-ignore
  23. allowed-endpoints: >
  24. api.github.com:443
  25. - name: rfc
  26. run: |
  27. gh pr edit "${PR}" \
  28. --remove-label "proposal draft" \
  29. --remove-label "proposal accepted" \
  30. --remove-label "proposal declined" \
  31. --remove-label "proposal deferred" \
  32. --add-label "proposal rfc"
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  35. PR: ${{ github.event.pull_request.html_url }}