Keeping your app up to date
The tooling and the runtime of lernapps.net get better all the time. Your app does not change by itself: it keeps the versions it was made with, until it is moved. Two helpers move it for you. Both are GitHub Apps, and both work only on a repo where you installed them. This page says what each does and which settings go with them. Your assistant can go through the clicks with you.
What the two helpers do
- lernapps-updater brings the tooling and the runtime. Every day it moves your app to the newest
versions, the same as
lernapps update, in a pull request of your repo. The check of your app runs on it, and the pull request merges when the check is green. Your content is never touched. If the check is red, the pull request stays open for you or your assistant. - Renovate brings the third-party packages your app uses. It reads the file
renovate.jsonin your repo, which the tooling wrote, and does nothing until its App is installed.
Without them your app keeps working, but it gets no new features and no fixes. lernapps.net lists the apps where the updater is missing in one issue of its catalog.
1. Install the two Apps
Each link opens a page of GitHub. Choose your account, then Only select repositories, then the repo of your app, then Install.
2. Allow auto-merge and squash merging
In your repo: Settings → General, scroll down to Pull Requests. Select
Allow auto-merge and Allow squash merging. Auto-merge lets a pull request merge
itself as soon as its check is green. Squash keeps the history of main in a line.
3. One rule for the branch main
The rule makes sure that nothing reaches main before the check of your app is green.
- Settings → Rules → Rulesets, then New ruleset and New branch ruleset.
- Name:
main. Enforcement: Active. - Target branches → Add a target: include the default branch, the pattern
main. - Rules:
- Require a pull request before merging. No approvals are needed; as the merge type, squash.
- Require linear history.
- Require status checks to pass before merging: add the check
app. It is the job of the workflowPages. GitHub offers a check only after it has run once, so the repo needs one pull request or push first. Useappand no other name: a check the repo does not produce blocks every pull request for good. - Block force pushes, which is on by default.
- Bypass list → Add bypass: the repository admins. You can then still push by hand.
- Create.
If something does not merge
Open the pull request lernapps/update in your repo. A red check means your assistant should fix it
there. A pull request that waits although the check is green often means that the ruleset asks for a check
your repo does not have.