Skip to content

Commit

Permalink
chore(release): 1.2.0 [skip ci]
Browse files Browse the repository at this point in the history
# [1.2.0](v1.1.2...v1.2.0) (2022-11-22)

### Features

* update to node 16 ([9fef85f](9fef85f))
  • Loading branch information
semantic-release-bot committed Nov 22, 2022
1 parent dd546fb commit a7ad044
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
18 changes: 9 additions & 9 deletions dist/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -15903,18 +15900,21 @@ 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) {
console.error(error);
(0,core.setFailed)(error.message);
}
}
main();
// eslint-disable-next-line unicorn/prefer-top-level-await
void main();

})();

Expand Down
2 changes: 1 addition & 1 deletion src/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -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> = T | null;
export type InputMaybe<T> = Maybe<T>;
Expand Down

0 comments on commit a7ad044

Please sign in to comment.