Apply suggestions from code review

Co-authored-by: Matt B <9885259+Mattamorphic@users.noreply.github.com>
This commit is contained in:
Lukasz Warchol
2022-06-27 15:01:14 +02:00
committed by GitHub
parent 53101abf47
commit 2914167b9b
2 changed files with 11 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -82,7 +82,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -125,7 +125,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -189,7 +189,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -253,7 +253,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -323,7 +323,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -413,7 +413,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}
@@ -458,7 +458,7 @@ describe('addToProject', () => {
test: /addProjectV2ItemById/,
return: {
addProjectV2ItemById: {
projectItem: {
item: {
id: 'project-item-id'
}
}

View File

@@ -22,7 +22,7 @@ interface ProjectNodeIDResponse {
interface ProjectAddItemResponse {
addProjectV2ItemById: {
projectItem: {
item: {
id: string
}
}
@@ -100,7 +100,7 @@ export async function addToProject(): Promise<void> {
const addResp = await octokit.graphql<ProjectAddItemResponse>(
`mutation addIssueToProject($input: AddProjectV2ItemByIdInput!) {
addProjectV2ItemById(input: $input) {
projectItem {
item {
id
}
}
@@ -113,7 +113,7 @@ export async function addToProject(): Promise<void> {
}
)
core.setOutput('itemId', addResp.addProjectV2ItemById.projectItem.id)
core.setOutput('itemId', addResp.addProjectV2ItemById.item.id)
}
export function mustGetOwnerTypeQuery(ownerType?: string): 'organization' | 'user' {