From 3be9a0ed8519553b877398e3414af3ab02aeac82 Mon Sep 17 00:00:00 2001 From: Andy Feller Date: Mon, 4 Dec 2023 13:54:16 -0500 Subject: [PATCH] Update triage.yml --- .github/workflows/triage.yml | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 71fc5426d..55c605090 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -1,12 +1,9 @@ name: Discussion Triage -run-name: ${{ github.event_name == 'issues' && github.event.issue.title || github.event.pull_request.title }} +run-name: ${{ github.event.issue.title }} on: issues: types: - labeled - pull_request: - types: - - labeled env: TARGET_REPO: github/cli jobs: @@ -37,31 +34,3 @@ jobs: > $BODY EOF - - pull_request: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'discuss' - steps: - - name: Create discuss issue based on source pull request - env: - BODY: ${{ github.event.pull_request.body }} - CREATED: ${{ github.event.pull_request.created_at }} - GH_TOKEN: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }} - LINK: ${{ github.repository }}#${{ github.event.pull_request.number }} - TITLE: ${{ github.event.pull_request.title }} - TRIGGERED_BY: ${{ github.triggering_actor }} - run: | - # Markdown quote source body by replacing newlines for newlines and markdown quoting - BODY="${BODY//$'\n'/$'\n'> }" - - # Create discuss issue using dynamically constructed body within heredoc - cat << EOF | gh issue create --title "Triage PR \"$TITLE\"" --body-file - --repo "$TARGET_REPO" --label discuss - **Title:** $TITLE - **Pull request:** $LINK - **Created:** $CREATED - **Triggered by:** @$TRIGGERED_BY - - --- - - > $BODY - EOF