Add configurable branch-prefix option for repo-memory#9195
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pkg/workflow/repo_memory.go
Outdated
| } | ||
|
|
||
| // Check for alphanumeric and branch-friendly characters (alphanumeric, hyphens, underscores) | ||
| for _, c := range prefix { |
There was a problem hiding this comment.
Changed to use regex pattern ^[a-zA-Z0-9_-]+$ for validation. All tests pass. (7424b85)
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot find an daily agentic workflow that uses repo-memory and set a custom branch prefix for it "daily" |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated |
|
@copilot relax minim prefix length to 4 characters |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot make sure that the detection job code, artifact upload/download handles the custom prefix. Look for hardcoded "memory/" |
Verified that the detection job and artifact upload/download correctly handle custom branch prefixes. All code uses dynamic values: Artifact paths: Based on memory ID ( No hardcoded "memory/" strings found in the critical paths. The daily-code-metrics workflow with |
Document the new branch-prefix configuration option for repo-memory
that allows customizing the branch name prefix (default: "memory").
- Add branch-prefix parameter explanation in Advanced Configuration
- Include validation rules (4-32 chars, alphanumeric/-/_, not "copilot")
- Add example showing branch-prefix: daily creating daily/{id} branches
- Update Multiple Repo Memory Configurations section with example
- Clarify branch-name defaults to {branch-prefix}/{id}
Documented feature from PR #9195 merged on 2026-01-07.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Document the new branch-prefix configuration option for repo-memory
that allows customizing the branch name prefix (default: "memory").
- Add branch-prefix parameter explanation in Advanced Configuration
- Include validation rules (4-32 chars, alphanumeric/-/_, not "copilot")
- Add example showing branch-prefix: daily creating daily/{id} branches
- Update Multiple Repo Memory Configurations section with example
- Clarify branch-name defaults to {branch-prefix}/{id}
Documented feature from PR #9195 merged on 2026-01-07.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Add branch-prefix configuration option for repo-memory
Completed:
BranchPrefixfield toRepoMemoryConfigstruct in GogenerateDefaultBranchNamefunction to use configurable prefixextractRepoMemoryConfigto parse branch-prefix from configRecent Changes:
^[a-zA-Z0-9_-]+$)regexpimport.github/workflows/daily-code-metrics.mdto usebranch-prefix: dailyas a demonstration of the feature in a real daily workflowdaily/defaultinstead ofmemory/code-metricsValidation Rules:
Example Usage
The
daily-code-metricsworkflow now demonstrates the feature:This creates the branch
daily/defaultinstead of the defaultmemory/default.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.