* 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
31 lines
1.4 KiB
YAML
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 }}
|