From 0dff7d0223cb789e4a34940ced036b18045beb1f Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Tue, 26 Oct 2021 11:16:04 -0400 Subject: [PATCH] APM project automation (#116306) --- .github/workflows/add-to-apm-project.yml | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/add-to-apm-project.yml diff --git a/.github/workflows/add-to-apm-project.yml b/.github/workflows/add-to-apm-project.yml new file mode 100644 index 000000000000..a47425ce8eda --- /dev/null +++ b/.github/workflows/add-to-apm-project.yml @@ -0,0 +1,28 @@ +name: Add to APM Project +on: + issues: + types: + - labeled +jobs: + add_to_project: + runs-on: ubuntu-latest + steps: + - uses: octokit/graphql-action@v2.x + id: add_to_project + if: | + github.event.label.name == 'Team:apm' + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:String!,$contentid:String!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAGc3Zs0VSg" + GITHUB_TOKEN: ${{ secrets.KIBANAMACHINE_TOKEN }}