Bump test/fixtures/prism from 35d8f75 to 442bd90
#6849
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dependabot auto-merge | |
| on: pull_request_target | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Enable auto-merge for Dependabot PRs | |
| if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }} | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| script: | | |
| const getPullRequestIdQuery = `query GetPullRequestId($owner: String!, $repo: String!, $pullRequestNumber: Int!) { | |
| repository(owner: $owner, name: $repo) { | |
| pullRequest(number: $pullRequestNumber) { | |
| id | |
| } | |
| } | |
| }` | |
| const repoInfo = { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pullRequestNumber: context.issue.number, | |
| } | |
| const response = await github.graphql(getPullRequestIdQuery, repoInfo) | |
| await github.rest.pulls.createReview({ | |
| pull_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| event: 'APPROVE', | |
| }) | |
| const enableAutoMergeQuery = `mutation ($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) { | |
| enablePullRequestAutoMerge(input: { | |
| pullRequestId: $pullRequestId, | |
| mergeMethod: $mergeMethod | |
| }) { | |
| pullRequest { | |
| autoMergeRequest { | |
| enabledAt | |
| enabledBy { | |
| login | |
| } | |
| } | |
| } | |
| } | |
| }` | |
| const data = { | |
| pullRequestId: response.repository.pullRequest.id, | |
| mergeMethod: 'MERGE', | |
| } | |
| await github.graphql(enableAutoMergeQuery, data) |