Merge pull request #3 from lowlighter/feat-bot-token
Fix wrong token use
This commit is contained in:
2
action/dist/index.js
vendored
2
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -29,7 +29,7 @@
|
||||
if (!token)
|
||||
throw new Error("You must provide a valid GitHub token")
|
||||
const graphql = octokit.graphql.defaults({headers:{authorization: `token ${token}`}})
|
||||
const rest = github.getOctokit(committer)
|
||||
const rest = github.getOctokit(token)
|
||||
|
||||
//Debug mode
|
||||
if (!debug)
|
||||
@@ -54,6 +54,8 @@
|
||||
console.log(`Render | complete`)
|
||||
|
||||
//Commit to repository
|
||||
{
|
||||
const rest = github.getOctokit(committer)
|
||||
let sha = undefined
|
||||
try {
|
||||
const {data} = await rest.repos.getContent({
|
||||
@@ -69,6 +71,7 @@
|
||||
content:Buffer.from(rendered).toString("base64"),
|
||||
})
|
||||
console.log(`Commit to repo | ok`)
|
||||
}
|
||||
|
||||
//Success
|
||||
console.log(`Success !`)
|
||||
|
||||
Reference in New Issue
Block a user