From 5aadc44567ad6f5e694dd46a09dc5247fc7a72c4 Mon Sep 17 00:00:00 2001 From: Chiedo John <2156688+chiedo@users.noreply.github.com> Date: Mon, 31 Jan 2022 16:55:51 -0500 Subject: [PATCH] Delete start-new-engineering-pr-workflow.yml (#24843) --- .../start-new-engineering-pr-workflow.yml | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 .github/workflows/start-new-engineering-pr-workflow.yml diff --git a/.github/workflows/start-new-engineering-pr-workflow.yml b/.github/workflows/start-new-engineering-pr-workflow.yml deleted file mode 100644 index 5290162e762b..000000000000 --- a/.github/workflows/start-new-engineering-pr-workflow.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Start new engineering PR workflow - -# **What it does**: -# **Why we have it**: -# **Who does it impact**: - -on: - pull_request_target: - types: - - opened - - reopened - -permissions: - contents: none - -jobs: - triage: - if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' - runs-on: ubuntu-latest - continue-on-error: true - env: - DRAFT_COLUMN_ID: 10095775 - REGULAR_COLUMN_ID: 10095779 - steps: - - uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d - continue-on-error: true - with: - github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} - script: | - // Only assign the engineering folks - try { - await github.teams.getMembershipForUserInOrg({ - org: 'github', - team_slug: 'docs-engineering', - username: context.payload.sender.login, - }); - } catch(err) { - return - } - - // Set column ID - const column_id = context.payload.pull_request.draft - ? process.env.DRAFT_COLUMN_ID - : process.env.REGULAR_COLUMN_ID - - // Try to create the card on the GitHub Project - try { - await github.projects.createCard({ - column_id: column_id, - content_type: 'PullRequest', - content_id: context.payload.pull_request.id - }); - } catch(error) { - console.log(error); - } - - - // Try to set the author as the assignee - const owner = context.payload.repository.owner.login - const repo = context.payload.repository.name - - try { - await github.issues.addAssignees({ - owner: owner, - repo: repo, - issue_number: context.payload.pull_request.number, - assignees: [ - context.payload.sender.login - ] - }); - } catch(error) { - console.log(error); - }