Skip to content

Experiment with PAT for Marking Auto-Merge #1

Experiment with PAT for Marking Auto-Merge

Experiment with PAT for Marking Auto-Merge #1

name: Experiment - PAT Auto-merge
# Throwaway experiment: does enabling auto-merge with GH_ACTIONS_REPO_TOKEN make the
# PR's merged_by a User, and does the resulting push trigger the merge-forward workflow?
# Delete this branch when done.
on:
push:
branches: [ 'experiment/pat-auto-merge' ]
permissions:
contents: read
env:
PR_NUMBER: 4050
GH_REPO: ${{ github.repository }}
jobs:
enable-auto-merge:
name: Enable Auto-merge With PAT
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork == false }}
steps:
- name: Identify Token Owner
env:
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
run: gh api user --jq '"token owner: \(.login) (\(.type))"'

Check failure on line 27 in .github/workflows/experiment-pat-auto-merge.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/experiment-pat-auto-merge.yml

Invalid workflow file

You have an error in your yaml syntax on line 27
- name: Enable Auto-merge
env:
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
run: gh pr merge "$PR_NUMBER" --auto --rebase
- name: Show Pull Request State
env:
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
run: gh pr view "$PR_NUMBER" --json state,baseRefName,autoMergeRequest