feat: added ability to generate stats on PR and sent to latest comment on PR

This commit is contained in:
Anmol Singh
2023-02-25 01:52:33 +05:30
parent c8ef0e49be
commit 94e4a6cbde
4 changed files with 86 additions and 2 deletions

View File

@@ -121,6 +121,26 @@ GITHUB_API_QUERIES = {
}
}
""",
# Query to collect current PR ID
# NOTE: Only to be used for PR review not to be used with actual action
"get_pr_id": """
{
repository(owner: "anmol098", name: "waka-readme-stats") {
pullRequest(number: $pr_number) {
id
}
}
}
""",
"add_pr_comment": """
mutation {
addComment(input: {subjectId: "$pr_id", body: "$comment"}) {
subject {
id
}
}
}
"""
}