mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Query issues using GraphQL API
|
|
inputs:
|
|
github_token:
|
|
description: 'GitHub API token'
|
|
required: true
|
|
filter:
|
|
# Filter syntax: https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
|
|
description: "The search filter for issues."
|
|
required: true
|
|
type: string
|
|
outputs:
|
|
query_result:
|
|
description: "The result of the query (JSON)"
|
|
value: ${{ steps.get_issues.outputs.query_result }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- id: get_issues
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: ${{ inputs.github_token }}
|
|
run: |
|
|
result="$(
|
|
gh api graphql \
|
|
--field search_query="${{ inputs.query }}" \
|
|
--raw-field query='
|
|
query($search_query: String!, $cursor: String) {
|
|
search(first: 100, query: $search_query, type: ISSUE, after: $cursor) {
|
|
pageInfo {
|
|
hasNextPage,
|
|
endCursor
|
|
}
|
|
nodes {
|
|
... on Issue {
|
|
title
|
|
url
|
|
}
|
|
}
|
|
}
|
|
}'
|
|
)"
|
|
echo "query_result=$result" >> $GITHUB_OUTPUT
|