Skip to content

ci: enable 'Allow GitHub Actions to create and approve pull requests' at the org level #187

Description

@williamzujkowski

Context

PR #185 migrated the release flow to release-please. The first run failed on this step:

```
##[error]release-please failed: GitHub Actions is not permitted to create or approve pull requests.
```

release-please correctly bumped `package.json` 0.5.7 → 0.6.0, regenerated `CHANGELOG.md`, and pushed the branch `release-please--branches--main--components--openlaw-git-pipeline` — it just couldn't open the PR for it. I opened PR #186 manually to unblock; release-please will recognize and re-manage it on the next push to main.

Attempted to enable the repo-level setting via API and got:

```
{"message":"Conflict","errors":"Write permissions for workflows are disabled by the organization"}
```

The org-level setting at the civic-source org blocks it.

Fix

Org admin needs to:

  1. Visit https://github.com/organizations/civic-source/settings/actions
  2. Under "Workflow permissions", check "Allow GitHub Actions to create and approve pull requests" (or change Workflow permissions from "Read repository contents" to "Read and write" depending on what's currently set)
  3. Then at repo level: https://github.com/civic-source/us-code-tracker/settings/actions — same checkbox

After this, every push to main will autonomously open/update a Release PR via release-please. No more manual `gh pr create` for releases.

Acceptance criteria

  • Org setting enabled
  • Repo setting enabled
  • After the next conventional-commit push to main, release-please opens or updates a Release PR without intervention

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions