From 35fdf0d3cb7610c2466117110bbb6061353a3cf9 Mon Sep 17 00:00:00 2001 From: Chiedo John <2156688+chiedo@users.noreply.github.com> Date: Thu, 18 Mar 2021 10:34:36 -0400 Subject: [PATCH] Merge How We Work Workflows and Fix bugs (#18299) Co-authored-by: chiedo --- .../workflows/send-eng-issues-to-backlog.yml | 30 ------------------- .../send-issues-to-how-how-we-work-boards.yml | 19 ++++++++++-- 2 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/send-eng-issues-to-backlog.yml diff --git a/.github/workflows/send-eng-issues-to-backlog.yml b/.github/workflows/send-eng-issues-to-backlog.yml deleted file mode 100644 index 11ca0afd2f..0000000000 --- a/.github/workflows/send-eng-issues-to-backlog.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Send Issue to EPD backlog - -on: - issues: - types: - - labeled - - reopened - -jobs: - triage: - if: github.repository == 'github/docs-internal' - runs-on: ubuntu-latest - continue-on-error: true - steps: - - name: Add issues with engineering label to project board - if: contains(github.event.issue.labels.*.name, 'engineering') || contains(github.event.issue.labels.*.name, 'design') || contains(github.event.issue.labels.*.name, 'Design') - uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 - with: - github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }} - script: | - var column_id = 9659080; - try { - github.projects.createCard({ - column_id: column_id, - content_id: context.payload.issue.id, - content_type: "Issue" - }); - } catch (error) { - console.log(error); - } diff --git a/.github/workflows/send-issues-to-how-how-we-work-boards.yml b/.github/workflows/send-issues-to-how-how-we-work-boards.yml index fe6d550a97..bf6e279ef5 100644 --- a/.github/workflows/send-issues-to-how-how-we-work-boards.yml +++ b/.github/workflows/send-issues-to-how-how-we-work-boards.yml @@ -11,7 +11,22 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: - - if: contains(github.event.issue.labels.*.name, 'feature') + - if: contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic') + uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 + with: + github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} + script: | + var column_id = 9659080; + try { + github.projects.createCard({ + column_id: column_id, + content_id: context.payload.issue.id, + content_type: "Issue" + }); + } catch (error) { + console.log(error); + } + - if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature') uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 with: github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} @@ -26,7 +41,7 @@ jobs: } catch (error) { console.log(error); } - - if: contains(github.event.issue.labels.*.name, 'epic') + - if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic') uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 with: github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}