Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Jun 28, 2022
1 parent fa7bf52 commit ce0475e
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,33 @@ jobs:
shell: bash -xe {0}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
PROJECT: "てすと"
ISSUE: ${{ github.event.issue.node_id || false }}
PR: ${{ github.event.pull_request.node_id || false }}
PROJECT: "PRO_kwLOHRQYxM4A3d8I"
steps:
- run: |
gh issue edit $NUMBER --add-project $PROJECT
if $ISSUE; then
gh api graphql \
-F "target=$ISSUE" \
-F "projectId=$PROJECT" \
-f query='
mutation($target: ID!, $projectId: ID!) {
updateIssue(input: {id: $target, projectIds: [$projectId]}) {
issue {
number
}
}
}'
else
gh api graphql \
-F "target=$PR" \
-F "projectId=$PROJECT" \
-f query='
mutation($target: ID!, $projectId: ID!) {
updatePullRequest(input: {pullRequestId: $target, projectIds: [$projectId]}) {
pullRequest{
number
}
}
}'
fi

0 comments on commit ce0475e

Please sign in to comment.