Skip to content

feat(github): open pull requests that move jobs to runplane - #8

Merged
ephraimduncan merged 2 commits into
mainfrom
feat/first-job-pull-request
Nov 6, 2026
Merged

ephraimduncan merged 2 commits into
mainfrom
feat/first-job-pull-request

Conversation

@ephraimduncan

@ephraimduncan ephraimduncan commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

An admin can open a pull request that moves the jobs of a repository to runplane. The form is on the first job page and on the GitHub tab of Settings, so more repositories can follow after the setup. The admin selects a repository and selects Open pull request. runplane then sets runs-on to the label for each job on ubuntu-latest or ubuntu-24.04, and the form shows the number of the pull request and a link to it on GitHub.

The first job page uses the suggested label of the code example. In Settings, a label select shows when more than one pool is enabled. The form stays after a pull request opens, so the next repository can follow at once.

The pull request has one commit on the branch runplane-runs-on. A workflow that runs on pull_request uses the changed runs-on for the pull request too. Thus the first job can come to runplane before a merge, and the waiting row of the first job page sees it. If an earlier pull request of runplane is open in the repository, the form shows that one. If that pull request is closed, runplane moves the branch to the new commit.

The GitHub App manifest asks for read and write access to Contents, Pull requests, and Workflows. GitHub refuses changes in .github/workflows without the Workflows permission. An app from an earlier release does not have these permissions. For such an app, the API returns 403 before it writes to the repository, and the form shows a link to the app permissions on GitHub.

The list contains only the repositories whose jobs runplane takes: not archived, and private unless public repositories are on. Members do not see the form, because only an admin can open the pull request.

Before First job page
First job page before the change First job page after a pull request opens
Settings, GitHub tab
The form in the GitHub settings with a label select

On the first job page, an admin can select a repository and open a pull
request. The pull request sets runs-on to the suggested label for each
job on ubuntu-latest or ubuntu-24.04. While an earlier pull request of
runplane is open, the page shows that one.

The GitHub App manifest asks for write access to Contents, Pull
requests, and Workflows. An app from an earlier release does not have
these permissions. For such an app, the API returns 403, and the page
shows a link to the app permissions on GitHub.
The GitHub tab of Settings has the "Open a pull request" form of the
first job page. An admin can move the jobs of more repositories to
runplane after the setup. With more than one enabled pool, the form
shows a label select.

The form stays after a pull request opens, so the next repository can
follow.
@ephraimduncan ephraimduncan changed the title feat(setup): open a pull request that moves jobs to runplane feat(github): open pull requests that move jobs to runplane Nov 5, 2026
@ephraimduncan
ephraimduncan merged commit d27d5da into main Nov 6, 2026
1 of 4 checks passed
ephraimduncan added a commit that referenced this pull request Nov 6, 2026
Merge 79d3da7, 1b78e39, and d27d5da of main. The features keep the
behavior of main. Each feature uses the packages of the refactor.

CI on the runplane runners (#7): the jobs use the runplane label, and the
image builds use QEMU. images.yml keeps the matrices of images.go and its
comment about the build context.

Image environment in VM mode (#9): internal/sandbox/guest owns
ImageEnvFile and its form. EncodeImageEnv writes the file in the root
disk, and runplane-init reads it with DecodeImageEnv. Thus the NUL
format has one place.

Pull requests that move jobs to runplane (#8):
- ghrest.Call has a JSON Body. ghrest.PullPermissions is part of
  AppPermissions, thus the manifest, the connect form, and the
  permission check use one list.
- github does not import huma. OpenPullRequest returns
  store.ErrNotFound, ghrest.ErrNoPullPermissions, or field.Problems, and
  the API changes them into 404, 403, and 422. Setup and the permission
  check read the installation through one function.
- The audit action github.pull_request.create is in the audit enum. Its
  detail has the repository, and the web has a text for it.
- The API gives permissions_url on the app. The web does not make the
  URL. The pull request description links to pages.Jobs.
- The label of the request has no pattern. The check against the
  enabled pools gives the 422 at body.label.
- The web finds the repositories with publicReposRun, the rule of the
  job access switch. Before, the web had a second rule that ignored dev
  mode and the modes of the servers.
- The route files only give params. The settings page and the first job
  step have the form. FormAlert moved to components/app, because the
  github pages must not import the setup pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant