Update and rename project-infra-monitoring-ui.yml to add-to-imui-project.yml (#126963)

The previous action was failing with an obscure JSON error, so I've copied the APM and Fleet actions instead.
This commit is contained in:
Jason Rhodes 2022-03-04 16:07:45 -05:00 committed by GitHub
parent 5f8f4d7c4f
commit 9514e6be38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 25 deletions

View file

@ -0,0 +1,31 @@
name: Add to Infra Monitoring UI project
on:
issues:
types:
- labeled
jobs:
add_to_project:
runs-on: ubuntu-latest
if: |
contains(github.event.issue.labels.*.name, 'Team:Infra Monitoring UI') ||
contains(github.event.issue.labels.*.name, 'Feature:Stack Monitoring') ||
contains(github.event.issue.labels.*.name, 'Feature:Logs UI') ||
contains(github.event.issue.labels.*.name, 'Feature:Metrics UI')
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
PROJECT_ID: "PN_kwDOAGc3Zs1EEA"
GITHUB_TOKEN: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}

View file

@ -1,25 +0,0 @@
name: Add issues to Infra Monitoring UI project
on:
issues:
types: [labeled]
jobs:
sync_issues_with_table:
runs-on: ubuntu-latest
name: Add issues to project
steps:
- name: Add
uses: richkuz/projectnext-label-assigner@1.0.2
id: add_to_projects
with:
config: |
[
{"label": "Team:Infra Monitoring UI", "projectNumber": 664},
{"label": "Feature:Stack Monitoring", "projectNumber": 664},
{"label": "Feature:Logs UI", "projectNumber": 664},
{"label": "Feature:Metrics UI", "projectNumber": 664},
]
env:
GRAPHQL_API_BASE: 'https://api.github.com'
PAT_TOKEN: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}