Add CI validation for agent file URLs and enhance lock file checks#16232
Add CI validation for agent file URLs and enhance lock file checks#16232
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR enhances CI validation to enforce consistency in agent file documentation references and improves robustness of lock file validation. The changes prevent incorrect URL references (using specific versions/commits instead of main branch) from being committed to the repository.
Changes:
- Added CI validation step to ensure all GitHub blob URLs in
agentic-workflows.agent.mduse/blob/main/instead of commit hashes or version tags - Added empty file list guard to lock file validation for better error handling
- Updated 9 GitHub URLs in the agent file from version-specific references to
mainbranch references
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Check for URLs that don't use 'main' branch | ||
| # Pattern matches: https://github.com/github/gh-aw/blob/{anything-except-main}/ | ||
| # Uses negative lookahead to exclude 'main' |
There was a problem hiding this comment.
The comment incorrectly states "Uses negative lookahead to exclude 'main'". The implementation uses grep -v (inverted match) to exclude lines containing /blob/main/, not a regex negative lookahead pattern. Consider updating the comment to accurately reflect the implementation, such as: "Uses grep -v to exclude lines containing '/blob/main/'".
| # Uses negative lookahead to exclude 'main' | |
| # Uses grep -v to exclude lines containing '/blob/main/' |
|
Ok
في الاثنين، ١٦ فبراير ٢٠٢٦، ٢٢:٤٢ Copilot ***@***.***> كتب:
… ***@***.**** commented on this pull request.
Pull request overview
This PR enhances CI validation to enforce consistency in agent file
documentation references and improves robustness of lock file validation.
The changes prevent incorrect URL references (using specific
versions/commits instead of main branch) from being committed to the
repository.
*Changes:*
- Added CI validation step to ensure all GitHub blob URLs in
agentic-workflows.agent.md use /blob/main/ instead of commit hashes or
version tags
- Added empty file list guard to lock file validation for better error
handling
- Updated 9 GitHub URLs in the agent file from version-specific
references to main branch references
------------------------------
💡 Add Copilot custom instructions
<http:///github/gh-aw/new/main/.github/instructions?filename=*.instructions.md>
for smarter, more guided reviews. Learn how to get started
<https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot>
.
------------------------------
In .github/workflows/ci.yml
<#16232 (comment)>:
> @@ -680,6 +685,43 @@ jobs:
echo "✅ All lock files compiled with development build (no version in header)"
+ - name: Check agent file URLs use main branch
+ run: |
+ echo "🔍 Checking .github/agents/agentic-workflows.agent.md for correct branch URLs..."
+
+ AGENT_FILE=".github/agents/agentic-workflows.agent.md"
+
+ if [ ! -f "$AGENT_FILE" ]; then
+ echo "
|
Lock files must be compiled with dev builds (no version in header), and agent documentation URLs must reference
mainbranch for consistency. Missing validation allowed incorrect references to slip through.Changes
CI Validation Enhancements (
.github/workflows/ci.yml):agentic-workflows.agent.mdURLs - ensures all GitHub blob URLs use/blob/main/instead of commit hashes or tagsAgent File URL Updates (
.github/agents/agentic-workflows.agent.md):blob/v0.45.0-33-g6615116d61/toblob/main/Example of URL validation check:
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:
https://api.github.com/repos/actions/setup-go/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/user/usr/bin/gh gh api user --jq .login(http block)/usr/bin/gh gh api user --jq .login ath ../../../.pr.prettierignore(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.