Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 2, 2025

The enforce-issue-number-in-description workflow was blocking Copilot PRs that don't reference closing issues, treating them as validation failures.

Changes

  • Added Copilot actor exclusions to workflow condition: Copilot, copilot-swe-agent[bot], copilot-swe-agent
  • Follows existing pattern for bot exclusions (dependabot, sentry-autofix, DonnieBLT)
if: >
  github.actor != 'dependabot[bot]'
  && github.actor != 'Copilot'
  && github.actor != 'copilot-swe-agent[bot]'
  && github.actor != 'copilot-swe-agent'

Copilot PRs now skip validation, allowing automated workflows to proceed without manual intervention.

Original prompt

skip this for copilot PRs - Run REPO_OWNER=OWASP-BLT
REPO_OWNER=OWASP-BLT
REPO_NAME=BLT
PR_NUMBER=4708

echo "Validating PR #${PR_NUMBER} in repository ${REPO_OWNER}/${REPO_NAME}"

Construct the GraphQL query

QUERY=$(jq -n
--arg repoOwner "$REPO_OWNER"
--arg repoName "$REPO_NAME"
--argjson prNumber "$PR_NUMBER"
'{
query: "query($REPO_NAME: String!, $REPO_OWNER: String!, $PR_NUMBER: Int!) {
repository(owner: $REPO_OWNER, name: $REPO_NAME) {
pullRequest(number: $PR_NUMBER) {
id
closingIssuesReferences(first: 50) {
edges {
node {
id
body
number
title
}
}
}
}
}
}",
variables: {
REPO_OWNER: $repoOwner,
REPO_NAME: $repoName,
PR_NUMBER: $prNumber
}
}')

Make the GraphQL API request

RESPONSE=$(curl -s -X POST
--location 'https://api.github.com/graphql'
-H "Authorization: bearer $GITHUB_TOKEN"
-H "Content-Type: application/json"
--data "$QUERY")

Check for errors in the response

ERRORS=$(echo "$RESPONSE" | jq -r '.errors')
if [[ "$ERRORS" != "null" ]]; then
echo "GraphQL query failed with errors: $ERRORS"
exit 1
fi

Extract closing issues

CLOSING_ISSUES=$(echo "$RESPONSE" | jq -r '.data.repository.pullRequest.closingIssuesReferences.edges')

if [[ "$CLOSING_ISSUES" == "[]" || -z "$CLOSING_ISSUES" ]]; then
echo "Error: No closing issues are referenced in the PR description. Add it in the PR under: Successfully merging this pull request may close these issues."
exit 1
fi

echo "Closing issues found: $CLOSING_ISSUES"
echo "PR description is valid with referenced closing issues."
shell: /usr/bin/bash -e {0}
env:
GITHUB_TOKEN: ***
##[debug]/usr/bin/bash -e /home/runner/work/_temp/6c9b3513-7dea-4de8-b329-8e02819cfee0.sh
Validating PR #4708 in repository OWASP-BLT/BLT
Error: No closing issues are referenced in the PR description. Add it in the PR under: Successfully merging this pull request may close these issues.
Error: Process completed with exit code 1.


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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Validate PR #4708 in repository OWASP-BLT/BLT Skip Copilot PRs in issue validation workflow Nov 2, 2025
Copilot AI requested a review from DonnieBLT November 2, 2025 18:13
@DonnieBLT DonnieBLT marked this pull request as ready for review November 9, 2025 19:21
@DonnieBLT DonnieBLT merged commit 8454396 into main Nov 9, 2025
11 of 13 checks passed
@DonnieBLT DonnieBLT deleted the copilot/validate-pr-4708 branch November 9, 2025 19:21
@github-project-automation github-project-automation bot moved this from Backlog to Done in 📌 OWASP BLT Project Board Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants