1
0
mirror of synced 2026-01-01 18:05:46 -05:00
Files
docs/.github/workflows/remove-from-fr-board.yaml
James M. Greene 3d88cae50b Add permission matrices to all Actions workflows (#23563)
* Add permission matrices to all Actions workflows

Also cleanup a few token references

* Add actions:read permissions for CodeQL

* Add prs:read permissions for unit test workflow
2021-12-14 04:37:36 +00:00

31 lines
1.4 KiB
YAML

name: Remove card from FR board
# **What it does**: Removes the triggering issue or PR from the docs-content first responder board. This workflow is expected to trigger from a slash command.
# **Why we have it**: To help with first responder duties
# **Who does it impact**: Docs-content team first responders
on:
repository_dispatch:
types: remove_from_docs_FR_board
permissions:
contents: none
jobs:
remove_from_FR_board:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Remove issue from board
if: ${{ github.event.client_payload.command.resource.type == 'Issue' }}
run: gh issue edit "$ISSUE_URL" --remove-project "Docs content first responder"
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
ISSUE_URL: https://github.com/${{ github.event.client_payload.command.repository.full_name }}/issues/${{ github.event.client_payload.command.resource.number }}
- name: Remove PR from board
if: ${{ github.event.client_payload.command.resource.type == 'PullRequest' }}
run: gh pr edit "$PR_URL" --remove-project "Docs content first responder"
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
PR_URL: https://github.com/${{ github.event.client_payload.command.repository.full_name }}/pull/${{ github.event.client_payload.command.resource.number }}