Skip to content

Commit

Permalink
Milo PR merge bot - add the correct permissions (#2274)
Browse files Browse the repository at this point in the history
* add Octokit

* use own github token
  • Loading branch information
mokimo authored May 8, 2024
1 parent 5533f4d commit 6080a22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/merge-to-stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ const merge = async ({ prs }) => {
}
files.forEach((file) => (SEEN[file] = true));
if (!process.env.LOCAL_RUN) {
const octokit = github.getOctokit(process.env.MILO_GITHUB_TOKEN);
await octokit.rest.pulls.merge({
await github.rest.pulls.merge({
owner,
repo,
pull_number: number,
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/merge-to-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: Merge to stage or queue to merge
uses: actions/[email protected]
with:
github-token: ${{ steps.milo-pr-merge-token.outputs.token }}
script: |
const main = require('./.github/workflows/merge-to-stage.js')
main({ github, context, core })
env:
MILO_GITHUB_TOKEN: ${{ steps.milo-pr-merge-token.outputs.token }}

0 comments on commit 6080a22

Please sign in to comment.