Skip to content

Commit

Permalink
fix: labels creation when install
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniergs committed Feb 22, 2021
1 parent aa3a50d commit c446ac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/policies/isGithubAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function shouldUsePersonalToken(fullName) {
}

module.exports = async function isGithubAuth(req, res, next) {
const { installation, repository, repositories } = req.body;
const { installation, repository, repositories_added } = req.body;
const app = new App({
id: github.appId,
privateKey: cert
});
const repositoryName = (repositories && repositories[0] && repositories[0].full_name) ? repositories[0].full_name : repository.full_name;
const repositoryName = (repositories_added && repositories_added[0] && repositories_added[0].full_name) ? repositories_added[0].full_name : repository.full_name;
// pretier-ignore
const octokitClient = (repository && shouldUsePersonalToken(repositoryName))
? new Octokit({ auth: process.env.PERSONAL_ACCESS_TOKEN })
Expand Down

0 comments on commit c446ac2

Please sign in to comment.