Repository navigation
Review Bot Setup
Source of truth: this wiki page.
For the owner. The review bot (ADR-0038,
#441) turns review mails into proposals in the decks and merges a change
to learners once enough other reviewers accept it. It runs inside the
hourly mail workflow, .github/workflows/feedback-mail.yml, and does
nothing until the steps below are done: until then reviews are filed as
issues, as now, and the workflow's log says the bot is not set up.
You need: admin on aaronified/fluenough, and about ten minutes.
An app released before ADR-0038 refuses a deck file that holds a proposal, and keeps its old decks instead of updating. So set the bot up only once a release with "Proposed changes" in reviewer mode is out, and most phones have it.
- On GitHub, open your picture > Settings > Developer settings > GitHub Apps > New GitHub App.
-
GitHub App name:
fluenough-review-bot(any free name). -
Homepage URL:
https://github.com/aaronified/fluenough. - Webhook: untick Active. The bot needs no webhook.
-
Repository permissions, and nothing else:
- Contents: Read and write
- Pull requests: Read and write
- Metadata stays Read-only, as GitHub sets it.
- Where can this GitHub App be installed? Only on this account.
- Create GitHub App.
- On the page that opens, note the App ID (a number, near the top).
- Further down, under Private keys, click Generate a private key.
A
.pemfile downloads. Keep it until step 4, then delete it.
- On the App's page, Install App > Install beside your account.
- Choose Only select repositories, pick
aaronified/fluenough, and Install.
The App may merge without an approving review. It must still wait for the
four required checks, which the bot waits for too: Validate decks,
Analyse and test, Build debug APK and Released app reads the decks
(#524), by name. Other checks on a commit do not hold a bot PR back. If
none of the four has started on a
bot PR an hour after it was last pushed, the log says so each run.
With a classic branch protection rule (Settings > Branches):
-
Edit the rule for
main. - Under Require a pull request before merging, tick Allow
specified actors to bypass required pull requests, and add
fluenough-review-bot. - Under Require status checks to pass before merging, keep the three
checks and add
Released app reads the decks(#524). Leave Do not allow bypassing the above settings unticked: ticked, it overrides the bypass list. - Save changes.
With rulesets instead (Settings > Rules > Rulesets): a bypass actor skips a whole ruleset, checks included. Keep the required status checks in a ruleset of their own with no bypass, and add the App to the bypass list of the ruleset that requires a pull request and its approval only, set to Always allow.
Settings > Secrets and variables > Actions > Secrets > New repository secret, twice:
| Name | Value |
|---|---|
FLUENOUGH_BOT_APP_ID |
The App ID from step 1.8. |
FLUENOUGH_BOT_PRIVATE_KEY |
The whole .pem file, from -----BEGIN to the last -----, line breaks included. |
Then delete the .pem file. If it is lost, generate another key on the
App's page and replace the secret.
Same page, Variables tab > New repository variable:
| Name | Value |
|---|---|
REVIEW_AGREEMENTS_NEEDED |
1 |
It is how many reviewers other than the proposer must accept a change,
each with a different rater code, before it goes to learners. Change it at
any time, to 2 once there are more reviewers; the next run uses it. Left
unset, or set to anything but a whole number of at least 1, it counts as
- A secret of the same name works too, if you would rather, but a secret cannot be read back and GitHub hides its value everywhere in the logs; a variable wins over it.
Once set up, the bot proposes every review mail already filed, oldest
first, and leaves out as outdated any suggestion whose card has changed
since. To skip the mails from before, give them the Gmail label
fluenough-proposed first.
Actions > Feedback mail to issues > Run workflow. Its log should
say Review bot: 1 other reviewer(s) must accept a proposal. and, at the
end, Agreed proposals: …. The bot's PRs are labelled review-bot, with
proposals, agreement or proposal outdated.
-
Any later commit wins: revert a bot PR, edit the card, or delete a
proposal's line from the deck. A bot PR is built again from
mainbefore it merges whenevermainhas moved, and an open agreement PR whose proposal you deleted is closed. A bot PR you close is never opened again. -
What a review left for you: suggestions on an example or a
picture, on a field the bot cannot write, or outdated, are counted in
the log as
Review by FL-…: n suggestion(s) left for the owner, n outdated; the text is in the mail. -
A bot PR whose checks fail stays open, labelled
review-bot: checks failed, for you to fix or close. - To stop the bot, delete either secret, or uninstall the App. Reviews are then filed as issues only, as before.
See also: Reviewing-Guide · Home
1. Learner guides
- Learner Guide
- Getting Started
- Today and Daily Lessons
- Drills and Skills
- Courses and Paths
- Proficiency Levels
- Scripts and Readings
- Readings ISO 15919
- Speaking and Listening
- Progress and Stats
- Profiles and Settings
- Backup and Restore
- Reporting a Problem
2. Deck building guides
- Deck Building Guide
- Deck Format
- Romanising Indic Languages
- Deck Licences and Quoted Books
- Deck Tools
3. Review guides
4. Translation guide
5. Building on iOS
6. Roadmap
7. Sources and attributions
8. Contribution and agentic coding