Skip to content

Commit

Permalink
[skip ci] update new issues workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed May 11, 2022
1 parent d95e1c1 commit 51fce4d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/new-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Add to project

on:
issues:
types: [opened,transferred]

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
id: add_project
with:
project-url: ${{ secrets.PROJECT_PLANNING }}
github-token: ${{ secrets.BOT_TOKEN_PROJECT }}
- name: Set Team
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_PROJECT }}
run: |
gh api graphql -f query='
mutation(
$project: ID!
$item: ID!
$status_field: ID!
$status_value: String!
) {
updateProjectNextItemField(
input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: $status_value
}
) {
projectNextItem {
id
}
}
}' -f project=${{ secrets.PROJECT_PLANNING_ID }} -f item=${{ steps.add_project.outputs.itemId }} -f status_field=${{ secrets.PLANNING_TEAM_FIELD_ID }} -f status_value=34196c74 --silent

0 comments on commit 51fce4d

Please sign in to comment.