Skip to content

Commit

Permalink
Fix data for User query
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoni committed Feb 18, 2024
1 parent 3d5231f commit f317ce5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions src/project-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ interface ProjectNodeIDResponse {
}

interface UserResponse {
data: {
user?: {
id: string
}
user?: {
id: string
}
}

Expand Down Expand Up @@ -233,11 +231,11 @@ export async function projectLink(): Promise<void> {

core.debug(`Owner Response: \n ${JSON.stringify(ownerResp, null, 2)}`)

if (!ownerResp?.data?.user?.id) {
if (!ownerResp?.user?.id) {
throw new Error(`No owner found for ${projectOwner}`)
}

const projectOwnerID = ownerResp?.data?.user?.id
const projectOwnerID = ownerResp?.user?.id

const copyProjectTemplateResp = await octokit.graphql<ProjectCopyTemplateResponse>(
`mutation createProjectFromTemplate($input: CopyProjectV2Input!) {
Expand Down

0 comments on commit f317ce5

Please sign in to comment.