Repository navigation
fix(analysis): one 256 function-call depth for Polyglot and SQLQuack's shared parsers #1326
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: Request Auto-Merge | |
| on: | |
| # pull_request rather than pull_request_target: GitHub blocks pull_request_target in public | |
| # repositories by default. The job checks out no pull request code and runs only for branches | |
| # in the same repository, which receive secrets under pull_request. | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| # Repositories with a merge queue require this workflow on the queue's merge groups too. There is | |
| # nothing to request there; the merge-group job only lets the run conclude as a success. | |
| merge_group: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| merge-group: | |
| if: github.event_name == 'merge_group' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Nothing to request for a merge group | |
| run: echo "The merge queue's required checks decide this merge." | |
| request-auto-merge: | |
| if: >- | |
| github.event_name == 'pull_request' && | |
| !github.event.pull_request.draft && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create delivery token | |
| id: delivery-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ vars.CHIO_DELIVERY_APP_ID }} | |
| private-key: ${{ secrets.CHIO_DELIVERY_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: ${{ github.event.repository.name }} | |
| - name: Request squash auto-merge | |
| env: | |
| GH_TOKEN: ${{ steps.delivery-token.outputs.token }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| # gh refuses --delete-branch when the base branch has a merge queue, so ask for it only | |
| # where there is none. With a queue, the repository's delete-on-merge setting removes it. | |
| run: | | |
| args=(--repo "$GITHUB_REPOSITORY" --auto --squash --match-head-commit "$PR_HEAD_SHA") | |
| queue=$(gh api graphql \ | |
| -f query='query($owner: String!, $name: String!, $branch: String!) { | |
| repository(owner: $owner, name: $name) { mergeQueue(branch: $branch) { id } } }' \ | |
| -f owner="${GITHUB_REPOSITORY%%/*}" -f name="${GITHUB_REPOSITORY#*/}" -f branch="$BASE_REF" \ | |
| --jq '.data.repository.mergeQueue.id // ""') | |
| if [ -z "$queue" ]; then | |
| args+=(--delete-branch) | |
| fi | |
| gh pr merge "$PR_URL" "${args[@]}" |