Created
August 29, 2020 10:14
-
-
Save mym0404/b1c0fc47bd842fac823e3c5f9c1bf3b4 to your computer and use it in GitHub Desktop.
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
async startCommitWorkflow({ base64, author, skipTest }: { base64: string; author: string; skipTest: boolean }) { | |
await axios.post( | |
'https://api.github.com/repos/{{owner}}/{{repository}}/actions/workflows/string-modification.yml/dispatches', | |
{ | |
ref: 'master', | |
inputs: { | |
values: base64, | |
author: author || 'Bot', | |
skipTest: skipTest ? 'true' : 'false', | |
}, | |
}, | |
{ | |
headers: { | |
Accept: 'application/vnd.github.v3+json', | |
Authorization: 'token ' + process.env.GITHUB_TOKEN, | |
}, | |
validateStatus: (status) => status === 204, | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment