Skip to content

Commit

Permalink
Add more info and debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Dec 14, 2023
1 parent e7ecf6c commit 9c58a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion automations/js/src/utils/pr.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export class PullRequest {
id: this.nodeId,
}
)
this.core.debug(`getPrDetails response: ${JSON.stringify(res, null, 2)}`)
const pr = res.node
return {
isMerged: pr.merged,
Expand Down Expand Up @@ -137,7 +138,7 @@ export class PullRequest {
labelIds,
}
)
this.core.debug('addLabels response:', JSON.stringify(res))
this.core.debug(`addLabels response: ${JSON.stringify(res, null, 2)}`)
return res.addLabelsToLabelable.labelable.labels.nodes
}

Expand Down
3 changes: 3 additions & 0 deletions automations/js/src/utils/projects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Project {
number: this.number,
}
)
this.core.debug(`getProjectId response: ${JSON.stringify(res, null, 2)}`)
const project = res.organization.projectV2
return {
projectId: project.id,
Expand Down Expand Up @@ -127,6 +128,7 @@ class Project {
* @returns {Promise<Card>} the info of the added card
*/
async addCard(issueId) {
this.core.info(`Adding card for issue/PR "${issueId}".`)
const res = await this.octokit.graphql(
`mutation addCard($projectId: ID!, $contentId: ID!) {
addProjectV2ItemById(input: {
Expand All @@ -148,6 +150,7 @@ class Project {
contentId: issueId,
}
)
this.core.debug(`addCard response: ${JSON.stringify(res, null, 2)}`)
const card = res.addProjectV2ItemById.item
return {
id: card.id,
Expand Down

0 comments on commit 9c58a2d

Please sign in to comment.