Skip to content

Comments

Add CI validation for agent file URLs and enhance lock file checks#16232

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-ci-checks-for-lock-validation
Feb 16, 2026
Merged

Add CI validation for agent file URLs and enhance lock file checks#16232
pelikhan merged 4 commits intomainfrom
copilot/update-ci-checks-for-lock-validation

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Lock files must be compiled with dev builds (no version in header), and agent documentation URLs must reference main branch for consistency. Missing validation allowed incorrect references to slip through.

Changes

CI Validation Enhancements (.github/workflows/ci.yml):

  • Added validation step for agentic-workflows.agent.md URLs - ensures all GitHub blob URLs use /blob/main/ instead of commit hashes or tags
  • Enhanced lock file check with empty file list guard

Agent File URL Updates (.github/agents/agentic-workflows.agent.md):

  • Updated 9 GitHub URLs from blob/v0.45.0-33-g6615116d61/ to blob/main/
  • Ensures agent always references latest documentation

Example of URL validation check:

INVALID_URLS=$(grep -n 'https://github.com/github/gh-aw/blob/' "$AGENT_FILE" | grep -v '/blob/main/' || true)
if [ -n "$INVALID_URLS" ]; then
  echo "❌ ERROR: Found URLs not using 'main' branch"
  exit 1
fi

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
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login (http block)
    • Triggering command: /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.

Copilot AI changed the title [WIP] Update ci.yml to validate .lock.yml and URLs Add CI validation for agent file URLs and enhance lock file checks Feb 16, 2026
Copilot AI requested a review from pelikhan February 16, 2026 22:32
@pelikhan pelikhan marked this pull request as ready for review February 16, 2026 22:39
Copilot AI review requested due to automatic review settings February 16, 2026 22:39
@pelikhan pelikhan merged commit 21134e0 into main Feb 16, 2026
53 of 55 checks passed
@pelikhan pelikhan deleted the copilot/update-ci-checks-for-lock-validation branch February 16, 2026 22:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 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'
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/'".

Suggested change
# Uses negative lookahead to exclude 'main'
# Uses grep -v to exclude lines containing '/blob/main/'

Copilot uses AI. Check for mistakes.
@mohamedbouddi7777-dev
Copy link

mohamedbouddi7777-dev commented Feb 20, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants