1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/.github/workflows/remove-from-fr-board.yaml
2023-10-25 21:03:09 +00:00

41 lines
1.9 KiB
YAML

name: Remove card from FR board
# **What it does**: Removes the triggering issue or PR from the docs-content first responder board.
# Also removes the `docs-content-fr` label. 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: read
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" --remove-label "docs-content-fr"
env:
GITHUB_TOKEN: ${{secrets.DOCS_BOT_PAT_WORKFLOW_READORG}}
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" --remove-label "docs-content-fr"
env:
GITHUB_TOKEN: ${{secrets.DOCS_BOT_PAT_WORKFLOW_READORG}}
PR_URL: https://github.com/${{ github.event.client_payload.command.repository.full_name }}/pull/${{ github.event.client_payload.command.resource.number }}
- name: Check out repo
if: ${{ failure() }}
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}