Add wiki flag to repo-memory frontmatter for GitHub Wiki git backing#19800
Add wiki flag to repo-memory frontmatter for GitHub Wiki git backing#19800
wiki flag to repo-memory frontmatter for GitHub Wiki git backing#19800Conversation
When wiki:true is set in repo-memory config:
- Uses the GitHub Wiki git URL ({repo}.wiki.git) for clone/push
- Defaults branch-name to 'master' (wiki default branch)
- Disables create-orphan (wiki always exists)
- Injects wiki-specific prompt text explaining GitHub Wiki syntax
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
wiki flag to repo-memory frontmatter for GitHub Wiki git backing
|
@copilot review agentic workflows and enable wiki memory on 3 workflows that can benefit from this memory |
…r, technical-doc-writer These 3 workflows produce documentation that benefits from GitHub Wiki backing: - glossary-maintainer: stores project glossary in wiki for browseable reference - developer-docs-consolidator: stores consolidated dev docs in wiki - technical-doc-writer: stores written docs in wiki with wiki markdown conventions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Enabled
Each gets Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot update generated step name to reflect wiki mode https://github.com/github/gh-aw/actions/runs/22754733639/job/65996608038#step:9:1 |
|
@copilot the prepopulated allowed repo list needs to be updated to allow the wiki repo https://github.com/github/gh-aw/actions/runs/22754733639/job/65997725548#step:7:1 |
…-memory) - Clone wiki-memory branch / Clone repo-memory branch - Upload wiki-memory artifact / Upload repo-memory artifact - Download wiki-memory artifact / Download repo-memory artifact - Push wiki-memory changes / Push repo-memory changes Also add step name assertions to existing wiki tests. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 263c60a. When
Non-wiki memories keep their original Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…arget When wiki:true, the push script's defaultRepo is github.repository (e.g. github/gh-aw) but TARGET_REPO is github/gh-aw.wiki. Pre-populate REPO_MEMORY_ALLOWED_REPOS with the wiki repo so validateRepo() accepts it. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit a12fce6. When Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot an error in push-repo-memory job should be reported in the agent failure issue/comment in the conclusion job |
When the push_repo_memory job itself fails (e.g. E004 permission errors),
pass GH_AW_PUSH_REPO_MEMORY_RESULT to the conclusion job so the failure
handler creates/updates the agent failure issue with a diagnostic message.
- notify_comment.go: add GH_AW_PUSH_REPO_MEMORY_RESULT env var pointing to
needs.push_repo_memory.result when repo-memory is configured
- handle_agent_failure.cjs: read the result, add hasPushRepoMemoryFailure
check to the skip condition, and build pushRepoMemoryFailureContext for
both the new-issue and add-comment branches
- agent_failure_issue.md / agent_failure_comment.md: add the
{push_repo_memory_failure_context} placeholder
- Tests: TestConclusionJobPushRepoMemoryResult and
TestConclusionJobNoPushRepoMemoryResult
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 2caccdc. When the
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Adds wiki: true support to repo-memory so workflows can store/retrieve persistent memory from a repository’s GitHub Wiki git backend ({repo}.wiki.git), and extends failure reporting to surface push_repo_memory job failures in the agent failure issue/comment.
Changes:
- Add
wikiboolean parsing to repo-memory config (object + array forms) with wiki-specific defaults (branchmaster,create-orphan: false). - Update generated workflow steps to target
{repo}.wikiand label steps aswiki-memory; inject GitHub Wiki Markdown guidance into the repo-memory prompt when applicable. - Improve agent failure reporting by passing
needs.push_repo_memory.resultinto the conclusion job and rendering a “Repo-Memory Push Failed” diagnostic.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/repo_memory.go | Adds Wiki field, parses wiki, applies wiki defaults, and adjusts generated steps/env to use {repo}.wiki and wiki-memory labels. |
| pkg/workflow/repo_memory_prompt.go | Injects a GitHub Wiki guidance note for single-default memory; annotates multi-memory list entries as GitHub Wiki. |
| pkg/workflow/repo_memory_test.go | Adds unit tests covering wiki parsing, defaults, step generation, prompt env var, and allowed-repo handling for wiki. |
| pkg/workflow/notify_comment.go | Passes GH_AW_PUSH_REPO_MEMORY_RESULT to failure handler when repo-memory is configured. |
| pkg/workflow/notify_comment_test.go | Tests that conclusion job includes (or omits) GH_AW_PUSH_REPO_MEMORY_RESULT appropriately. |
| pkg/parser/schemas/main_workflow_schema.json | Adds wiki boolean to repo-memory schemas (object + array variants). |
| docs/src/content/docs/reference/frontmatter-full.md | Documents the new wiki option in frontmatter reference. |
| actions/setup/md/repo_memory_prompt.md | Adds __GH_AW_WIKI_NOTE__ placeholder to inject wiki-specific guidance. |
| actions/setup/md/agent_failure_issue.md | Adds {push_repo_memory_failure_context} placeholder to failure issue template. |
| actions/setup/md/agent_failure_comment.md | Adds {push_repo_memory_failure_context} placeholder to failure comment template. |
| actions/setup/js/handle_agent_failure.cjs | Detects push_repo_memory job failure via env var and emits a “Repo-Memory Push Failed” context block. |
| .github/workflows/technical-doc-writer.md | Enables wiki-backed repo-memory for technical doc writer workflow. |
| .github/workflows/glossary-maintainer.md | Enables wiki-backed repo-memory for glossary maintainer workflow. |
| .github/workflows/developer-docs-consolidator.md | Enables wiki-backed repo-memory for developer docs consolidator workflow. |
| .github/workflows/workflow-health-manager.lock.yml | Propagates GH_AW_WIKI_NOTE placeholder plumbing and includes GH_AW_PUSH_REPO_MEMORY_RESULT wiring. |
| .github/workflows/technical-doc-writer.lock.yml | Lockfile update to include repo-memory prompt, wiki env vars, wiki-memory steps, and push job result reporting. |
| .github/workflows/security-compliance.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/security-alert-burndown.campaign.g.lock.yml | Lockfile update to pass GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/pr-triage-agent.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/metrics-collector.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE. |
| .github/workflows/glossary-maintainer.lock.yml | Lockfile update to include wiki prompt/env vars, wiki-memory steps, and push job result reporting. |
| .github/workflows/firewall-escape.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/discussion-task-miner.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/developer-docs-consolidator.lock.yml | Lockfile update to include wiki prompt/env vars, wiki-memory steps, and push job result reporting. |
| .github/workflows/delight.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/deep-report.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/daily-news.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/daily-copilot-token-report.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/daily-code-metrics.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/daily-cli-performance.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/copilot-session-insights.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/copilot-agent-analysis.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/code-scanning-fixer.lock.yml | Lockfile update to pass GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/audit-workflows.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
| .github/workflows/agent-performance-analyzer.lock.yml | Lockfile update to pass GH_AW_WIKI_NOTE and GH_AW_PUSH_REPO_MEMORY_RESULT. |
Comments suppressed due to low confidence (1)
pkg/workflow/repo_memory.go:756
- Same issue as in generateRepoMemorySteps: unconditionally appending ".wiki" can yield "*.wiki.wiki" if targetRepo already includes the wiki suffix. Make the suffixing logic idempotent to avoid generating invalid clone/push URLs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| fmt.Fprintf(&memoryList, " (branch: `%s`", memory.BranchName) | ||
| if memory.TargetRepo != "" { | ||
| fmt.Fprintf(&memoryList, " in `%s`", memory.TargetRepo) | ||
| } | ||
| if memory.Wiki { | ||
| memoryList.WriteString(", GitHub Wiki") | ||
| } | ||
| memoryList.WriteString(")\n") |
There was a problem hiding this comment.
Wiki-mode prompt guidance is only injected for the single-memory default ID path. For a single memory with a non-"default" ID (or multiple memories), the prompt only adds ", GitHub Wiki" in the list but does not include the wiki Markdown conventions note described in the PR. Consider adding a wiki note section to the multi-memory template (and EnvVars), or emitting the single-memory template for any single entry (regardless of ID) so wiki:true always provides the syntax guidance.
| // Apply wiki-mode defaults: wikis use master branch and never need orphan creation | ||
| if entry.Wiki { | ||
| if !explicitBranchName { | ||
| entry.BranchName = "master" | ||
| } | ||
| entry.CreateOrphan = false | ||
| } |
There was a problem hiding this comment.
Wiki-mode forces CreateOrphan=false, but the push implementation currently creates an orphan branch whenever the branch doesn’t exist (see actions/setup/js/push_repo_memory.cjs branch checkout logic). That means a wiki:true config with an explicit non-existent branch-name can still create and push a new orphan branch, contradicting the intent of forcing create-orphan off. Consider either: (1) disallowing non-"master" branch-name in wiki mode, or (2) passing a CREATE_ORPHAN flag into the push step and updating push_repo_memory to respect it (skip instead of creating).
| // For wiki mode, append .wiki to the repo path so the clone script uses the wiki git URL | ||
| if memory.Wiki { | ||
| targetRepo = targetRepo + ".wiki" | ||
| } |
There was a problem hiding this comment.
Appending ".wiki" unconditionally can produce invalid repo slugs like "owner/repo.wiki.wiki" if a caller already set target-repo to the wiki slug (or if future code passes a value that already includes the suffix). Consider making this idempotent (only append when the slug doesn’t already end with ".wiki") and/or validating/rejecting "target-repo" values that already include ".wiki" when wiki:true.
This issue also appears on line 753 of the same file.
Add mention of the wiki: true flag that switches repo-memory backing to the GitHub Wiki's git endpoint, introduced in PR #19800. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
repo-memorypreviously only supported regular repository git branches. This adds awikiboolean that targets the GitHub Wiki's git backend instead, and instructs the agent to follow GitHub Wiki markdown conventions.Changes
wikifield onRepoMemoryEntry— parsed in both object and array config pathsmaster(wiki default branch);create-orphanforced tofalse(wiki always exists); explicitbranch-nameoverrides the default.wikitoTARGET_REPOso scripts resolve{repo}.wiki.gitREPO_MEMORY_ALLOWED_REPOSwith the.wikirepo sopush_repo_memory.cjsaccepts it as a valid target__GH_AW_WIKI_NOTE__placeholder torepo_memory_prompt.md; populated with GitHub Wiki syntax guidance whenwiki: true, empty otherwise(GitHub Wiki)for wiki-backed entrieswikiboolean added to both object and arrayoneOfschemas andfrontmatter-full.mdwiki-memoryinstead ofrepo-memoryin their names whenwiki: true— e.g.Clone wiki-memory branch,Push wiki-memory changes,Upload/Download wiki-memory artifactpush_repo_memoryjob itself fails (e.g. permission or configuration errors), the conclusion job now surfaces aGH_AW_PUSH_REPO_MEMORY_RESULTglossary-maintainer.md— stores project glossary/terminology reference in the wiki for browseable referencedeveloper-docs-consolidator.md— stores consolidated developer documentation and instructions in the wikitechnical-doc-writer.md— stores written technical documentation in the wiki as a persistent libraryExample
With
wiki: true, the agent receives a note like:And the generated workflow steps are labelled accordingly:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.