Repository navigation
feat(github): open pull requests that move jobs to runplane - #8
Merged
Merged
Conversation
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-onto the label for each job onubuntu-latestorubuntu-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 onpull_requestuses the changedruns-onfor 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/workflowswithout 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.