Denis AfonsoandClaude Opus 5.5 34c8bda1a8 ci: use backport app token in cherry-pick workflow (#32803)
The cherry-pick workflow can no longer open PRs. Since
coder/github-org-terraform#76 (Nov 17), the org disables "Allow GitHub
Actions to create and approve pull requests", so `gh pr create` with
`GITHUB_TOKEN` fails:

```
GraphQL: GitHub Actions is not permitted to create or approve pull requests (createPullRequest)
```

Example: [run
45991857596](https://github.com/coder/coder/actions/runs/45991857596/job/140481380335)
for #32793. That run had already pushed `backport/32793-to-<version>`,
and because the workflow exits as soon as the branch exists, re-running
it can't open the PR.

`backport.yaml` already opens its PRs with the backporter App token
(#32352). This brings `cherry-pick.yaml` in line with it.

**App token**

- Runs the job in `environment: main` with only `contents: read` and
`id-token: write` for the job token.
- Mints the token with the same pinned `coder/github-app-token-action`
step and `BACKPORT_APP_*` inputs (contents, pull_requests, workflows and
issues write on coder/coder).
- Uses the App token for both `git push` and `gh`, and commits as the
App bot, as backport does.

**Recovery on re-runs, as in `backport.yaml`**

- Checks for an existing PR first (`--state all`) and exits only if
there is one.
- If the branch already exists, reuses it and goes on to open the PR. If
its tip is the conflict placeholder commit, the PR keeps the `
(conflicts)` title suffix.
- Otherwise cherry-picks and pushes as before.

**Best-effort extras, as in `backport.yaml`**

- `gh pr create` only sets base, head, title and body. Label, assignee
and reviewer are added afterwards with separate `gh pr edit` calls that
warn instead of failing.
- `gh label create` warns instead of failing.

Branch naming, the conflict placeholder, the PR body and the comment on
the original PR are unchanged.

**Side effects**

- Cherry-pick PRs are now opened by the App, not `github-actions[bot]`,
so they trigger CI like any other PR.
- They also trigger `pr-cherry-pick-check.yaml`, which comments when a
title doesn't start with `fix:`. Conflicts are therefore marked with a `
(conflicts)` suffix, as in `backport.yaml`, instead of a `[CONFLICT]`
prefix.
- With `workflows: write`, cherry-picks that touch `.github/workflows/`
can now be pushed too.
- Approvals: the requester is still asked to review the cherry-pick, so
they can approve and merge their own cherry-pick. That isn't new, and
backport works the same way. The proposal to require a
`release-managers` approval on bot-opened release PRs isn't in
`coder.yaml` yet
([discussion](https://codercom.slack.com/archives/C0CHP8J479T/p1795510371505229)).

> [!IMPORTANT]
> The backporter App's Cloud KMS key only signs for
`/.github/workflows/backport.yaml@refs/heads/main`
(`coder-backporter-app` in coder/gcp
`projects/production/coder-github-apps/apps.tf`). coder/gcp#497 adds
`/.github/workflows/cherry-pick.yaml@refs/heads/main`; merge and apply
it first, or the token step fails to sign.

Validated with `actionlint` (with shellcheck) and `zizmor --offline` (no
findings). I also ran the script locally with a stubbed `gh` against a
local remote: existing PR → skip; fresh run → PR opened, failing
label/reviewer calls only warn; stranded placeholder branch → reused and
opened with the ` (conflicts)` suffix.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:14:06 +00:00
2026-11-25 09:53:18 +00:00
2026-11-25 09:53:18 +00:00
…
…

Coder Logo Light Coder Logo Dark

Self-Hosted Cloud Development Environments and AI Agents

Coder Banner Light Coder Banner Dark

Quickstart | Docs | Why Coder | Premium

discord release godoc OpenSSF Best Practices OpenSSF Scorecard license Ask DeepWiki

Coder is a self-hosted platform for cloud development environments and AI coding agents. Workspaces are defined with Terraform, connected through a secure Wireguard® tunnel, and automatically shut down when not used. Coder Agents runs a native AI coding agent whose loop executes in the control plane on your infrastructure, with no API keys in workspaces.

  • Define cloud development environments in Terraform
    • EC2 VMs, Kubernetes Pods, Docker Containers, etc.
  • Automatically shutdown idle resources to save on costs
  • Onboard developers in seconds instead of days
  • Delegate coding work to AI agents on your infrastructure
    • Bring any model (Anthropic, OpenAI, Google, Bedrock, self-hosted)
    • No LLM credentials in workspaces, user identity on every action
    • Centralized model governance, cost tracking, and audit logging

Coder platform showing templates and a running workspace

Quickstart

Check out our install guides for other methods and a complete tutorial.

Try Coder with the install script on Linux and macOS, or grab the latest binary or installer from GitHub Releases on Windows:

curl -fsSL https://coder.com/install.sh | sh

Start the server and open http://localhost:3000 to create your initial user, create a Docker template, and provision your first workspace:

coder server

For a production deployment, add a PostgreSQL database (version 13 or later) and an external access URL, and see our validated architectures for sizing and infrastructure guidance:

coder server --postgres-url <url> --access-url <url>

Without these flags, Coder uses a built-in database and sets up a *.try.coder.app access URL for evaluation. Use coder --help for the full list of flags and environment variables.

Documentation

Browse the documentation or visit a specific section below:

  • Workspaces: Workspaces contain the IDEs, dependencies, and configuration information needed for software development
  • Templates: Templates are written in Terraform and describe the infrastructure for workspaces
  • Coder Agents: Delegate coding work to AI agents running on your self-hosted infrastructure
  • AI Gateway: Centralize authentication, auditing, and cost controls for AI tooling
  • Administration: Learn how to operate Coder
  • Premium: Learn about paid features built for large teams
  • IDEs: Connect your existing editor to a workspace

Support

Open an issue for bugs and feature requests.

For community support, showcasing what you built, and feedback on in-progress features, join our Discord or GitHub Discussions.

Dedicated support is included in Coder Premium. For more information, visit coder.com/pricing.

Integrations

New integrations are always in progress. Open an issue to request one. Contributions are welcome in any official or community repository.

Official

Community

Contributing

New contributors are always welcome. If you are new to the Coder codebase, see the contribution guide to get started.

Hiring

Apply on the careers page if you are interested in joining the team.

S
Description
No description provided
Readme AGPL-3.0
2.3 GiB
0 Stars 1 Watchers 0 Forks
Languages
Go 73.5%
TypeScript 24.3%
Shell 0.9%
PLpgSQL 0.3%
Go Template 0.2%
Other 0.5%