Skip to content

Commit

Permalink
fix: check for setting remote urls for forks (#2009)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Mar 26, 2024
1 parent 4ff7936 commit 1176164
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 44 deletions.
49 changes: 21 additions & 28 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.

23 changes: 8 additions & 15 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,21 +745,14 @@ export const getParentSha = async ({cwd}: {cwd: string}): Promise<string> => {
}

export const setForkRemote = async ({cwd}: {cwd: string}): Promise<void> => {
if (github.context.payload.repository?.fork) {
await exec.getExecOutput(
'git',
[
'remote',
'set-url',
'fork',
github.context.payload.repository?.clone_url
],
{
cwd,
silent: !core.isDebug()
}
)
}
await exec.getExecOutput(
'git',
['remote', 'set-url', 'fork', github.context.payload.repository?.clone_url],
{
cwd,
silent: !core.isDebug()
}
)
}

export const verifyCommitSha = async ({
Expand Down

0 comments on commit 1176164

Please sign in to comment.