Skip to content

Commit

Permalink
fix(automation): Automatically add new issues to GitHub Project (#4245)
Browse files Browse the repository at this point in the history
This is based on https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions as #4150 was not a proper fix

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
  • Loading branch information
tomkerkhove committed Feb 16, 2023
1 parent cddfca3 commit 41e10f1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/auto-add-issues-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
id
fields(first:20) {
nodes {
id
name
settings
... on ProjectV2Field {
id
name
}
}
}
}
Expand All @@ -38,9 +39,9 @@ jobs:
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2Item(input: {projectId: $project, contentId: $issue}) {
projectV2Item {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2Item.projectV2Item.id')"
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')"

0 comments on commit 41e10f1

Please sign in to comment.