A technical writer's 'update the docs after every change' suggests a routine that keeps the docs current when a pull request merges
2 files+17−00/2 viewed
| 291 | 291 | assert.equal(pageId("https://g1t.sh/acme/-/docs/general/refunds-pag_01jabc?x=1"), "pag_01jabc"); | |
| 292 | 292 | assert.equal(pageId(" "), null); | |
| 293 | 293 | }); | |
| 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 | + | }); |
| 32 | 32 | ||
| 33 | 33 | const RULES: Rule[] = [ | |
| 34 | 34 | { | |
| 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 | + | { | |
| 35 | 45 | match: /\b(review|reviewing|reviews)\b.*\b(pull requests?|prs?|changes?|code)\b|\b(pull requests?|prs?)\b.*\breview/i, | |
| 36 | 46 | routine: (duty) => ({ | |
| 37 | 47 | name: "Review pull requests", |