diff --git a/CHANGELOG.md b/CHANGELOG.md index b1810ef2..c806fd5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0](https://github.com/bbeesley/gha-auto-dependabot-rebase/compare/v1.1.2...v1.2.0) (2022-11-22) + + +### Features + +* update to node 16 ([9fef85f](https://github.com/bbeesley/gha-auto-dependabot-rebase/commit/9fef85f052948f116cf064acbe065c61555700d2)) + ## [1.1.2](https://github.com/bbeesley/gha-auto-dependabot-rebase/compare/v1.1.1...v1.1.2) (2021-10-14) ## [1.1.1](https://github.com/bbeesley/gha-auto-dependabot-rebase/compare/v1.1.0...v1.1.1) (2021-09-21) diff --git a/dist/main.cjs b/dist/main.cjs index 550e417b..ee253405 100644 --- a/dist/main.cjs +++ b/dist/main.cjs @@ -15874,19 +15874,16 @@ const GetPullRequests = lib ` - - - async function getPullRequests(ok) { const { owner, repo } = github.context.repo; const query = GetPullRequests.loc.source.body; - const res = await ok.graphql({ + const response = await ok.graphql({ query, owner, repo, }); - console.info(`Found pull requests: ${JSON.stringify(res.repository.pullRequests.edges, null, 2)}`); - return res.repository.pullRequests.edges ?? []; + console.info(`Found pull requests: ${JSON.stringify(response.repository.pullRequests.edges, null, 2)}`); + return response.repository.pullRequests.edges ?? []; } function isDependabotPullRequest(pr) { return pr?.node?.author?.login === 'dependabot'; @@ -15903,10 +15900,12 @@ async function addCommentToPullRequest(ok, pr) { } async function main() { try { - const ok = github.getOctokit(process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN); + const ok = github.getOctokit( + // eslint-disable-next-line n/prefer-global/process + process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN); const prs = await getPullRequests(ok); if (prs) { - await Promise.all(prs.map((pr) => addCommentToPullRequest(ok, pr))); + await Promise.all(prs.map(async (pr) => addCommentToPullRequest(ok, pr))); } } catch (error) { @@ -15914,7 +15913,8 @@ async function main() { (0,core.setFailed)(error.message); } } -main(); +// eslint-disable-next-line unicorn/prefer-top-level-await +void main(); })(); diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index d7468204..76b951dd 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -1,4 +1,4 @@ -import type { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; import gql from 'graphql-tag'; export type Maybe = T | null; export type InputMaybe = Maybe;