From 056d1f193d71d0c0291a990f232b77cd46209c58 Mon Sep 17 00:00:00 2001 From: gordsport <83510148+gordsport@users.noreply.github.com> Date: Fri, 10 Dec 2021 13:35:23 +0000 Subject: [PATCH] Add Github action to add new issues to frontend project board Added as part of https://github.com/vegaprotocol/token-frontend/issues/1057 --- .github/workflows/add_issue_new_projects.yml | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/add_issue_new_projects.yml diff --git a/.github/workflows/add_issue_new_projects.yml b/.github/workflows/add_issue_new_projects.yml new file mode 100644 index 000000000..56943d72d --- /dev/null +++ b/.github/workflows/add_issue_new_projects.yml @@ -0,0 +1,26 @@ +--- + +name: Auto Assign Issue to New Project + +"on": + issues: + types: [opened] + +jobs: + add_issue: + runs-on: ubuntu-latest + steps: + - name: Add Issue to New Front End Project Board + env: + GITHUB_TOKEN: ${{ secrets.GH_NEW_CARD_TO_PROJECT }} + PROJECT_ID: ${{ secrets.FRONT_END_PROJECT_ID }} + ISSUE_ID: ${{ github.event.issue.node_id }} + run: | + gh api graphql -f query=' + mutation($project:ID!, $issue:ID!) { + addProjectNextItem(input: {projectId: $project, contentId: $issue}) { + projectNextItem { + id + } + } + }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id'