Skip to content

Commit

Permalink
try query for finding Eco-CI comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-mm committed Oct 30, 2023
1 parent d82f674 commit 0fb6166
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,29 +159,23 @@ runs:
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
# Define the GraphQL query to retrieve comments for the PR
# query=$(cat <<EOF
# query{
# repository(owner: "${{ github.repository_owner }}", name: "${{ github.repository }}") {
# pullRequest(number: $PR_NUMBER) {
# comments(first: 100) {
# nodes {
# body
# author {
# login
# }
# }
# }
# }
# }
# }
# EOF
# )
# query="query { repository(owner: \"${{ github.repository_owner }}\", name: \"${{ github.repository }}\") { issues(last:20, states:CLOSED) { edges { node { title url labels(first:5) { edges { node { name } } } } } } } }"
FULL_REPO="${{ github.repository }}"
REPO_NAME="${FULL_REPO#*/}"
# query='query { repository(owner: \"${{ github.repository_owner }}\", name: \"'$REPO_NAME'\") { pullRequest(number: '$PR_NUMBER') { comments(first: 100) { nodes { body author { login } } } } } }'
query='query { repository(owner: \"${{ github.repository_owner }}\", name: \"'$REPO_NAME'\") { pullRequest(number: '$PR_NUMBER') { comments(first: 100) { nodes { body author { login } } } } } }'
query='query {
search(query: \"repo: '${{ github.repository }}' is:pr is:open Eco-CI in:body author:github-actions\", last:10, type:ISSUE){
edges{
node{
... on PullRequest{
body
title
}
}
}
}
}'
echo "DMM---"
echo "$query"
RESPONSE=$(curl -H "Authorization: bearer ${{ github.token }}" -X POST -d "{\"query\":\"$query\"}" https://api.github.com/graphql)
Expand Down

0 comments on commit 0fb6166

Please sign in to comment.