Skip to content

Add agentic workflow for automated PR validation against contributing guidelines#708

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-branch-protection-workflow
Draft

Add agentic workflow for automated PR validation against contributing guidelines#708
Copilot wants to merge 3 commits intomainfrom
copilot/add-branch-protection-workflow

Conversation

Copy link

Copilot AI commented Feb 19, 2026

Implements automated validation of PRs adding API resources to ensure compliance with contributing guidelines before maintainer review.

Changes

Workflow Configuration (.github/workflows/pr-resource-validator.md)

  • Triggers on pull_request events when README.md changes
  • Validates 8 contributing rules:
    • Single API per PR
    • Table formatting (URL, Auth, HTTPS, CORS)
    • Description length ≤100 chars
    • Alphabetical ordering within sections
    • PR title format: "Add [API-name] API"
    • No TLD in API names (e.g., ❌ "Gmail.com" → ✔ "Gmail")
    • No "API" suffix in names (e.g., ❌ "Gmail API" → ✔ "Gmail")
    • URL accessibility check via web-fetch
  • Posts structured feedback comment with specific violations or approval

Tooling

  • GitHub API (default toolsets): reads PR metadata, diffs, commits
  • web-fetch: validates API documentation URLs
  • safe-outputs: posts comments without requiring write permissions

Compilation

  • .gitattributes: marks .lock.yml files as generated with merge strategy
  • .lock.yml: compiled GitHub Actions workflow (52.9 KB)

Example Output

**PR Validation Failed**

**Issues Found:**
1. Multiple APIs added - contributing guidelines require one API per PR
2. Description exceeds 100 characters (found 127)
3. API name "Gmail.com API" violates naming rules (contains TLD and "API" suffix)
4. Incorrect alphabetical ordering in Social category

**Guidelines Reference:**
Please review the [CONTRIBUTING.md](../../CONTRIBUTING.md) for detailed guidelines.

The AI agent analyzes PR diffs and provides actionable feedback, reducing maintainer load for common guideline violations.

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/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.46.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.46.3 --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 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 February 19, 2026 12:18
Co-authored-by: marcelscruz <12413903+marcelscruz@users.noreply.github.com>
Co-authored-by: marcelscruz <12413903+marcelscruz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to enforce contributing guidelines for new resources Add agentic workflow for automated PR validation against contributing guidelines Feb 19, 2026
Copilot AI requested a review from marcelscruz February 19, 2026 12:20
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