diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index d208db4..8e8c57b 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -28,8 +28,8 @@ jobs: with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | - const pullRequest = context.payload.workflow_run.pull_requests[0] - const repository = context.repo + const pullRequest = context.payload.workflow_run.pull_requests[0]; + const repository = context.repo; const reviewers = [ "ergebnis-bot", @@ -40,53 +40,53 @@ jobs: repo: repository.repo, pull_number: pullRequest.number, reviewers: reviewers, - }) + }); - name: "Assign @ergebnis-bot" uses: "actions/github-script@v5" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | - const pullRequest = context.payload.workflow_run.pull_requests[0] - const repository = context.repo + const pullRequest = context.payload.workflow_run.pull_requests[0]; + const repository = context.repo; const assignees = [ "ergebnis-bot", - ] + ]; await github.rest.issues.addAssignees({ owner: repository.owner, repo: repository.repo, assignees: assignees, issue_number: pullRequest.number - }) + }); - name: "Approve pull request" uses: "actions/github-script@v5" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | - const pullRequest = context.payload.workflow_run.pull_requests[0] - const repository = context.repo + const pullRequest = context.payload.workflow_run.pull_requests[0]; + const repository = context.repo; await github.rest.pulls.createReview({ event: "APPROVE", owner: repository.owner, repo: repository.repo, pull_number: pullRequest.number, - }) + }); - name: "Merge pull request" uses: "actions/github-script@v5" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | - const pullRequest = context.payload.workflow_run.pull_requests[0] - const repository = context.repo + const pullRequest = context.payload.workflow_run.pull_requests[0]; + const repository = context.repo; await github.rest.pulls.merge({ merge_method: "merge", owner: repository.owner, pull_number: pullRequest.number, repo: repository.repo, - }) + }); diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d911ac3..d2dbbe3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,16 +28,16 @@ jobs: owner: repository.owner, repo: repository.repo, tag_name: "${{ env.RELEASE_TAG }}", - }) + }); - core.exportVariable("RELEASE_BODY", response.data.body) + core.exportVariable("RELEASE_BODY", response.data.body); - name: "Create release" uses: "actions/github-script@v5" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | - const repository = context.repo + const repository = context.repo; await github.rest.repos.createRelease({ body: "${{ env.RELEASE_BODY }}", @@ -47,4 +47,4 @@ jobs: prerelease: false, repo: repository.repo, tag_name: "${{ env.RELEASE_TAG }}", - }) + }); diff --git a/.github/workflows/triage.yaml b/.github/workflows/triage.yaml index b54c3bb..0225fe6 100644 --- a/.github/workflows/triage.yaml +++ b/.github/workflows/triage.yaml @@ -22,22 +22,22 @@ jobs: const branchPrefixLabels = { feature: "enhancement", fix: "bug", - } + }; - const pullRequest = context.payload.pull_request - const repository = context.repo + const pullRequest = context.payload.pull_request; + const repository = context.repo; - const branchName = pullRequest.head.ref + const branchName = pullRequest.head.ref; - const matches = branchName.match(new RegExp('^([^/]+)\/')); + const matches = branchName.match(new RegExp('^([^/]+)\/'));; if (matches instanceof Array && branchPrefixLabels.hasOwnProperty(matches[1])) { - const label = branchPrefixLabels[matches[1]] + const label = branchPrefixLabels[matches[1]]; github.issues.addLabels({ issue_number: pullRequest.number, labels: [ - label + label, ], owner: repository.owner, repo: repository.repo,