#!/bin/sh echo -n "Enter your GitHub username: " read username echo -n "Enter the owner of the repository: " read owner echo -n "Enter the name of the repository: " read repo echo -n "Enter the commit SHA: " read sha node_id=$(curl \ "https://api.github.com/repos/${owner}/${repo}/commits/${sha}" \ 2> /dev/null | grep node_id | head -n1 | sed 's@^.*"\(.*\)".*$@\1@') echo $node_id curl -u "${username}" -X POST -d " \ { \ \"query\": \"query { \ node(id: \\\"${node_id}\\\") { \ ... on Commit { \ message \ pushedDate \ } \ } \ }\" \ } " https://api.github.com/graphql