-
Notifications
You must be signed in to change notification settings - Fork 46
Use workflow-id marker for close-older-issues search and ensure consistency across all item types #11800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use workflow-id marker for close-older-issues search and ensure consistency across all item types #11800
Conversation
…prefix/labels Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Copilot, ensure the workflow-id marker (the XML comment) is the same for comments, issues, discussions, and pull-requests. |
|
@copilot Ensure the |
…cussions, PRs) - Remove workflow-id from compound XML marker in generate_footer.cjs - Add standalone workflow-id marker to issues, discussions, and pull requests - Consistent with how comments already use standalone markers Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in d27aea6. The workflow-id marker is now a standalone
Done in d27aea6. The workflow-id marker now uses the same standalone XML comment syntax across all item types:
This is separate from the compound XML marker that contains engine metadata (gh-aw-agentic-workflow, tracker-id, engine, version, model, run). |
|
@copilot, refactor the creation of the XMN marker into a helper function and use it in one location instead of hardcoding the string everywhere. |
- Add generateWorkflowIdMarker() helper for creating the XML comment marker
- Add getWorkflowIdMarkerContent() helper for search queries
- Replace all hardcoded `<!-- gh-aw-workflow-id: ${workflowId} -->` strings with helper calls
- Centralize marker format in generate_footer.cjs for consistency
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 61d139e. Created two helper functions in
Replaced all hardcoded workflow-id marker strings across 6 files with calls to these helpers. |
|
@copilo add tests |
|
@copilot Add tests |
- Add 12 new tests for generateWorkflowIdMarker() and getWorkflowIdMarkerContent() - Test basic functionality, special characters, empty inputs - Test consistency between full marker and content extraction - Test usability for search queries - All 30 tests in generate_footer.test.cjs now pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 52dbf03. Added 12 comprehensive tests for the workflow-id marker helper functions in
All 30 tests in the file now pass (18 existing + 12 new). |
Update close-older-issues to use workflow-id marker
Analysis
close-older-issuessearches using title prefix and/or labelsGH_AW_WORKFLOW_IDenvironment variable is available in safe-output jobsImplementation Plan
searchOlderIssuesto search using workflow-id markercloseOlderIssuesto use workflow-id marker searchChanges Made
Marker Pattern Consistency
All item types now use a standalone workflow-id marker (consistent with comments):
<!-- gh-aw-workflow-id: workflow-name -->This marker is added separately from the compound XML marker that contains engine metadata.
Refactored Helper Functions
Created centralized helper functions in
generate_footer.cjs:generateWorkflowIdMarker(workflowId)- Returns the full XML comment markergetWorkflowIdMarkerContent(workflowId)- Returns just the marker content for search queriesTest Coverage
Added comprehensive test coverage in
generate_footer.test.cjs:Files Updated
generateWorkflowIdMarker()helpergenerateWorkflowIdMarker()helpergenerateWorkflowIdMarker()helpergenerateWorkflowIdMarker()helpergenerateWorkflowIdMarker()helpergetWorkflowIdMarkerContent()helper for searchHow It Works Now
When
close-older-issues: trueis enabled:<!-- gh-aw-workflow-id: {id} -->markerBenefits
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.