File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,21 +57,10 @@ jobs:
5757 COPILOT_REVIEW=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews" --jq '[.[] | select(.user.login == "copilot-pull-request-reviewer[bot]")] | length')
5858
5959 # Use GraphQL to count unresolved Copilot review threads
60- UNRESOLVED_THREADS=$(gh api graphql -f query='
61- query($owner: String!, $repo: String!, $pr: Int!) {
62- repository(owner: $owner, name: $repo) {
63- pullRequest(number: $pr) {
64- reviewThreads(first: 100) {
65- nodes {
66- isResolved
67- comments(first: 1) {
68- nodes { author { login } }
69- }
70- }
71- }
72- }
73- }
74- }' -f owner="${{ github.repository_owner }}" -f repo="${{ github.event.repository.name }}" -F pr="$PR_NUMBER" \
60+ REPO_OWNER="${{ github.repository_owner }}"
61+ REPO_NAME="${{ github.repository }}"
62+ REPO_NAME="${REPO_NAME#*/}" # Extract repo name from owner/repo
63+ UNRESOLVED_THREADS=$(gh api graphql -f query="query { repository(owner: \"$REPO_OWNER\", name: \"$REPO_NAME\") { pullRequest(number: $PR_NUMBER) { reviewThreads(first: 100) { nodes { isResolved comments(first: 1) { nodes { author { login } } } } } } } }" \
7564 --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .comments.nodes[0].author.login == "copilot-pull-request-reviewer")] | length')
7665
7766 COPILOT_OK="false"
You can’t perform that action at this time.
0 commit comments