Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusgrave committed Sep 9, 2019
1 parent 0735164 commit 17953fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

28 changes: 13 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@ const token = core.getInput("repo-token");

const octokit = new github.GitHub(token);

console.log(github.context.payload["pull_request"]);
// console.log(github.context.payload["pull_request"]);

// (async () => {
// try {
// await octokit.graphql(`
// mutation {
// submitPullRequestReview(input: {
// pullRequestReviewId: "${
// github.context.payload["pull_request"].base.repo["node_id"]
// }",
// event: APPROVE
// }) {clientMutationId} }`);
// } catch (e) {
// console.error(e);
// }
// })();
(async () => {
try {
await octokit.graphql(`
mutation {
submitPullRequestReview(input: {
pullRequestReviewId: "${github.context.payload["pull_request"].id}",
event: APPROVE
}) {clientMutationId} }`);
} catch (e) {
console.error(e);
}
})();

0 comments on commit 17953fe

Please sign in to comment.