@@ -5,8 +5,6 @@ import { getOctokit } from './octokit';
5
5
export async function moveIssueToInReviewStatus (
6
6
issueNumber : number ,
7
7
) : Promise < void > {
8
- core . info ( `Move issue #${ issueNumber } to In Review` ) ;
9
-
10
8
try {
11
9
const itemId = await getProjectV2ItemId ( issueNumber ) ;
12
10
@@ -15,6 +13,8 @@ export async function moveIssueToInReviewStatus(
15
13
return ;
16
14
}
17
15
16
+ core . info ( `Move issue #${ issueNumber } to In Review` ) ;
17
+
18
18
await getOctokit ( ) . graphql (
19
19
`
20
20
mutation ($itemId: ID!, $projectId: ID!, $filedId: ID!, $optionId: String!) {
@@ -42,8 +42,6 @@ export async function moveIssueToInReviewStatus(
42
42
async function getProjectV2ItemId (
43
43
issueId : number ,
44
44
) : Promise < string | undefined > {
45
- core . info ( 'Get issue id' ) ;
46
-
47
45
try {
48
46
const contentId = await getIssueId ( issueId ) ;
49
47
@@ -52,6 +50,8 @@ async function getProjectV2ItemId(
52
50
return ;
53
51
}
54
52
53
+ core . info ( `Get project v2 item id for #${ issueId } ` ) ;
54
+
55
55
const mutationResponse = await getOctokit ( ) . graphql < {
56
56
addProjectV2ItemById : {
57
57
item : {
@@ -74,6 +74,10 @@ async function getProjectV2ItemId(
74
74
} ,
75
75
) ;
76
76
77
+ core . info (
78
+ `Project v2 item id: ${ mutationResponse . addProjectV2ItemById . item . id } ` ,
79
+ ) ;
80
+
77
81
return mutationResponse . addProjectV2ItemById . item . id ;
78
82
} catch ( error ) {
79
83
if ( error instanceof Error ) {
0 commit comments