Skip to content

Commit

A technical writer's 'update the docs after every change' suggests a routine that keeps the docs current when a pull request merges

syntaqxcommitted Parenta9254ccBrowse files
2 files+17−00/2 viewed
+7−0
291291 assert.equal(pageId("https://g1t.sh/acme/-/docs/general/refunds-pag_01jabc?x=1"), "pag_01jabc");
292292 assert.equal(pageId(" "), null);
293293 });
294+
295+test("a technical writer's duties suggest keeping the docs current when a pull request merges", () => {
296+ const inky = ["Update the docs after every change that makes them wrong", "Turn decisions made in chat into pages", "Write release notes and the weekly summary"];
297+ const names = suggestRoutines(inky, []).map((s) => [s.routine.name, s.routine.events]);
298+ assert.deepEqual(names[0], ["Keep the docs current", ["pull_merged"]]);
299+ assert.ok(names.some(([name]) => name === "Weekly summary"));
300+});
+10−0
3232
3333 const RULES: Rule[] = [
3434 {
35+ match: /\b(docs|documentation|pages|runbooks?)\b.*\b(change|changes|merge|merges|wrong|current|up to date|stale)\b/i,
36+ routine: (duty) => ({
37+ name: "Keep the docs current",
38+ instructions: `When a pull request is merged, keep the docs true (${trimmed(duty)}). Find the pages it makes wrong or incomplete: pages marked possibly out of date by this change first, then search_docs for what it changed. Update each with edit_page (it becomes a suggestion where you can't edit), citing the pull request. Post a short list of what you changed here; say so if nothing needed changing.`,
39+ schedule: null,
40+ events: ["pull_merged"],
41+ repos: [],
42+ }),
43+ },
44+ {
3545 match: /\b(review|reviewing|reviews)\b.*\b(pull requests?|prs?|changes?|code)\b|\b(pull requests?|prs?)\b.*\breview/i,
3646 routine: (duty) => ({
3747 name: "Review pull requests",