Skip to content

Commit

Permalink
fix: Try without async
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion committed Dec 29, 2023
1 parent 24fca25 commit d57f398
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

async function approvePullRequest(github, repo, pull_request, body) {
await github.rest.pulls.createReview({
function approvePullRequest(github, repo, pull_request, body) {
github.rest.pulls.createReview({
owner: repo.owner.login,
repo: repo.name,
pull_number: pull_request.number,
Expand All @@ -10,8 +10,8 @@ async function approvePullRequest(github, repo, pull_request, body) {
})
}

async function addComment(github, repo, pull_request, body) {
await github.rest.issues.createComment({
function addComment(github, repo, pull_request, body) {
github.rest.issues.createComment({
owner: repo.owner.login,
repo: repo.name,
issue_number: pull_request.number,
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const outputMessage = 'message'
* The main function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
async function run({ github, context, inputs, metadata }) {
function run({ github, context, inputs, metadata }) {
try {
if (github === null || github === undefined) {
const msg = 'No github provided!'
Expand Down Expand Up @@ -65,7 +65,7 @@ async function run({ github, context, inputs, metadata }) {
core.setOutput(outputState, validationState)
core.setOutput(outputMessage, validationMessage)
if (execute) {
await cmd(github, repository, pull_request, body)
cmd(github, repository, pull_request, body)
return core.info(validationMessage)
} else {
return core.info(validationMessage)
Expand Down

0 comments on commit d57f398

Please sign in to comment.