issue作成
mutation createIssue($title: String!, $body: String, $labelIds: [ID!]) {
createIssue(input:{title: $title, body: $body, repositoryId: "Your Repository Id", labelIds: $labelIds}) {
issue {
id
number
}
}
}
issueをproject(beta)に登録
mutation addProjectV2ItemById($issueId: ID!, $projectId: ID!) {
addProjectV2ItemById(input: {contentId: $issueId, projectId: $projectId}) {
item {
id
}
}
}
project(beta)に紐ついたissueのprojectカスタム項目を更新(複数)
mutation updateProjectV2ItemFieldValue($issueId: ID!, $column1: String!, $column2: Float!, $column1FieldId: ID!, $column2FieldId: ID!, $projectId: ID!) {
updateColumn1: updateProjectV2ItemFieldValue(input:{itemId: $issueId, fieldId: $column1FieldId, projectId: $projectId, value: {iterationId: $column1Id}}) {
clientMutationId
},
updateColumn2: updateProjectV2ItemFieldValue(input:{itemId: $issueId, fieldId: $column2FieldId, projectId: $projectId, value: {number: $column2}}){
clientMutationId
}
}
Iteration項目のvalue idを見つかる
query($org: String!, $projectNum: Int!, $fieldName: String!) {
organization(login: $org) {
projectV2(number: $projectNum) {
field(name: $fieldName) {
... on ProjectV2IterationField {
id
configuration {
iterations {
id
title
}
}
}
}
}
}
}
最後に
projectV2のField探す、repository id探すなどは以前の記事にすでに紹介ずみ