Skip to content

Commit

Permalink
Add team: ide label for new issues (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylos101 committed May 11, 2023
1 parent 993d002 commit a3035f9
Showing 1 changed file with 8 additions and 51 deletions.
59 changes: 8 additions & 51 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,15 @@
name: Issue and PR Triage
name: Issue Triage
on:
pull_request:
types: [opened]
issues:
types: [opened]
jobs:
triage:
name: Triage issue/PR
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Add team label
uses: andymckay/[email protected]
with:
add-labels: "team: workspace"

- name: Get project data
if: github.event_name == 'issues'
env:
GITHUB_TOKEN: ${{ secrets.LABELER_TOKEN }}
ORGANIZATION: gitpod-io
PROJECT_NUMBER: 16
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
id
projectNext(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
- name: checkout
uses: actions/checkout@v2

echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'IN_PROGRESS_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
- name: Add Issue to project
if: github.event_name == 'issues'
env:
GITHUB_TOKEN: ${{ secrets.LABELER_TOKEN }}
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'
- name: add label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: "team: ide"

0 comments on commit a3035f9

Please sign in to comment.