generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
299aa7c
commit d1356e0
Showing
5 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import * as core from '@actions/core'; | ||
import { getOctokit, context} from '@actions/github' | ||
import { getOctokit, context } from '@actions/github'; | ||
import { createBranch } from './create-branch'; | ||
|
||
async function run() { | ||
try { | ||
const branch = core.getInput('branch'); | ||
const sha = core.getInput('sha'); | ||
core.debug(`Creating branch ${branch}`); | ||
await createBranch(getOctokit, context, branch, sha) | ||
} catch (error: any) { | ||
core.setFailed(error.message); | ||
} | ||
try { | ||
const branch = core.getInput('branch'); | ||
const sha = core.getInput('sha'); | ||
core.debug(`Creating branch ${branch}`); | ||
const isCreated = await createBranch(getOctokit, context, branch, sha); | ||
core.setOutput('created', Boolean(isCreated)); | ||
} catch (error: any) { | ||
core.setFailed(error.message); | ||
} | ||
} | ||
run(); |