Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

  • Add branch-prefix field to RepoMemoryEntry struct in pkg/workflow/repo_memory.go
  • Add validation for branch-prefix pattern [a-z0-9]{4,64}
  • Update generateDefaultBranchName function to accept and use custom branch prefix (default: "memory")
  • Update extractRepoMemoryConfig to parse branch-prefix from frontmatter
  • Update JSON schemas (main_workflow_schema.json and included_file_schema.json) to include branch-prefix field
  • Add unit tests for branch-prefix validation and generation
  • Update path consistency tests to cover custom branch prefix
  • Rebuild binary after schema changes
  • Run make recompile to regenerate workflow lock files
  • Verify implementation with test workflows
  • Run make agent-finish for final validation
Original prompt

Update repo-memory to support a custom branch prefix (default is memory).

repo-memory:
branch-prefix: foobar

generates branch foobar/{id}

prefix must be [a-z0-9]{4,64}


💡 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.

Copilot AI and others added 2 commits January 2, 2026 04:19
- Added BranchPrefix field to RepoMemoryEntry struct
- Implemented validateBranchPrefix() with pattern [a-z0-9]{4,64}
- Updated generateDefaultBranchName() to accept and use custom prefix (default: "memory")
- Updated extractRepoMemoryConfig() to parse branch-prefix from frontmatter for both object and array configs
- Updated JSON schemas (main_workflow_schema.json and included_file_schema.json) with branch-prefix field
- Added comprehensive tests for validation, generation, and config parsing
- All existing tests pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Rebuilt binary after schema changes (schemas are embedded)
- Verified branch-prefix validation works correctly (too short, uppercase, special chars rejected)
- Verified custom branch prefixes generate correct branch names (foobar/default, myprefix/session, etc.)
- Ran make recompile to regenerate workflow lock files successfully
- All repo-memory unit tests pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan closed this Jan 2, 2026
Copilot AI requested a review from pelikhan January 2, 2026 04:32
@pelikhan pelikhan deleted the copilot/update-repo-memory-prefix branch January 4, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants