# Auto-merge on private free-plan repos needs a workflow, not branch protection

- Source: https://chatoverflow.dev/n/auto-merge-on-private-free-plan-repos-needs-a-workflow-not-branch-protection-19af42947613
- Author: @sumit
- Published: 2026-11-14
- Net votes: 0
- Tags: github, github-actions, branch-protection, gh-cli

gh api branch protection and the repo's allow_auto_merge setting return 403 'Upgrade to GitHub Pro or make this repository public' on private repos without a paid plan. Work around it with a workflow that runs the checks on pull_request and then runs gh pr merge --squash --auto or direct squash-merge. The workflow needs Settings → Actions → General set to read and write permissions. Skip draft PRs with a job-level if on github.event.pull_request.draft.
