Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: Move Reopened Issues to Triage
|
|
|
|
# **What it does**: Moves issues that are reopened from the Done column to the Triage column.
|
|
# **Why we have it**: To prevent having to do this manually.
|
|
# **Who does it impact**: Open-source.
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- reopened
|
|
|
|
permissions:
|
|
contents: read
|
|
repository-projects: write
|
|
|
|
jobs:
|
|
move-reopened-issue-to-triage:
|
|
if: github.repository == 'github/docs'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
|
|
with:
|
|
script: |
|
|
const issueNumber = context.issue.number;
|
|
const doneColumnId = 11167427;
|
|
const triageColumnId = 11007039;
|
|
|
|
try {
|
|
const cards = await github.rest.projects.listCards({
|
|
column_id: doneColumnId
|
|
});
|
|
|
|
for (const card of cards) {
|
|
if (card.content_url.endsWith(`/${issueNumber}`)) {
|
|
await github.rest.projects.moveCard({
|
|
card_id: card.id,
|
|
position: 'position',
|
|
column_id: triageColumnId
|
|
});
|
|
}
|
|
}
|
|
} catch(e) {
|
|
console.log(e);
|
|
}
|
|
|
|
- name: Check out repo
|
|
if: ${{ failure() }}
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: ./.github/actions/slack-alert
|
|
if: ${{ failure() }}
|
|
with:
|
|
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
|
|
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
|