GitHub Git Get Ref
1 credits/call
ae_github_git_get_ref
Get the current commit SHA for a branch or tag in a GitHub repository.
1 credits/call
Pricing
1 credits/call
| Condition | Charge |
|---|---|
| Each call | 1 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
ref | string | Yes | The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. | — |
repo | string | Yes | The name of the repository without the `.git` extension. The name is not case sensitive. | — |
owner | string | Yes | The account owner of the repository. The name is not case sensitive. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_github_git_get_ref' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"owner": "lcestou",
"ref": "tags/v1.5.8",
"repo": "dsh-oh-my-claude"
}
}'Response exampleresponse.json
{
"node_id": "REF_kwDOUXWkALByZWZzL3RhZ3MvdjEuNS44",
"object": {
"sha": "de7db2c10f2555ad5c9534a24413516e3a0a3e27",
"type": "commit",
"url": "https://api.github.com/repos/lcestou/dsh-oh-my-claude/git/commits/de7db2c10f2555ad5c9534a24413516e3a0a3e27"
},
"ref": "refs/tags/v1.5.8",
"url": "https://api.github.com/repos/lcestou/dsh-oh-my-claude/git/refs/tags/v1.5.8"
}
