Skip to content

Enable merge queue on main (blocked: token lacks Administration: write) #111

Description

@argonui

Task

Enable a merge queue on main so PRs merge through a validated queue rather than directly.

Status

  • Workflow half is done. The Go workflow now runs on the merge_group event (PR ci: run on merge_group so a merge queue can gate PRs #110, merged to main), so its build check will execute against the queue's candidate merge commits.
  • Repo-setting half is blocked. Creating the ruleset that turns the queue on requires the Administration: Read and write permission, which the current automation token lacks — POST /repos/argonui/TTSModManager/rulesets returns 403 Resource not accessible by personal access token.

What needs to happen

Someone with admin access finishes this one of two ways.

Option A — grant the token Administration: Read and write, then the ruleset can be created via API. Ready-to-use payload:

{
  "name": "main merge queue",
  "target": "branch",
  "enforcement": "active",
  "conditions": { "ref_name": { "include": ["~DEFAULT_BRANCH"], "exclude": [] } },
  "rules": [
    { "type": "merge_queue", "parameters": {
        "merge_method": "MERGE",
        "grouping_strategy": "ALLGREEN",
        "max_entries_to_build": 5,
        "max_entries_to_merge": 5,
        "min_entries_to_merge": 1,
        "min_entries_to_merge_wait_minutes": 5,
        "check_response_timeout_minutes": 60
    } },
    { "type": "required_status_checks", "parameters": {
        "required_status_checks": [ { "context": "build" } ],
        "strict_required_status_checks_policy": false,
        "do_not_enforce_on_create": false
    } }
  ]
}

Option B — configure it in the UI: Settings → Rules → Rulesets → New branch ruleset:

  • Enforcement: Active; target: Default branch.
  • Rule Require merge queue → merge method Merge commit.
  • Rule Require status checks to pass → add build.

Notes

  • Safe to enable now: because merge_group is already on main, the queue's required build check can run. (Enabling it before PR ci: run on merge_group so a merge queue can gate PRs #110 landed would have deadlocked merges.)
  • Chosen config mirrors the current single CI job (build) and merge-commit method.
  • Labels aren't set on this issue: the automation token also lacks Issues label-write.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions