# getRepositoryActivity

**Identifier:** `github_getRepositoryActivity`

**Provider:** [GitHub API](https://kirha.com/providers/github.md)

Get commit activity and contributor trends for GitHub repositories over the last year. Returns weekly commit counts, top contributors with their recent activity, and growth metrics. Use repositoryFullNames from searchRepositories.

## Run it with the CLI

```bash
kirha tools run github_getRepositoryActivity \
  --input '{
    "repositoryFullNames": [
      "<repositoryFullNames>"
    ]
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "github_getRepositoryActivity",
  "input": {
    "repositoryFullNames": [
      "<repositoryFullNames>"
    ]
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "repositoryFullNames": {
      "description": "Repository full names in 'owner/repo' format. From searchRepositories repositoryFullNames.",
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "repositoryFullNames"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "repositories": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "activeContributorsLast90Days": {
            "type": "number"
          },
          "commitsLast30Days": {
            "type": "number"
          },
          "commitsLast90Days": {
            "type": "number"
          },
          "repositoryFullName": {
            "type": "string"
          },
          "topContributors": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "commitsLast90Days": {
                  "type": "number"
                },
                "login": {
                  "type": "string"
                },
                "totalCommits": {
                  "type": "number"
                }
              },
              "required": [
                "login",
                "totalCommits",
                "commitsLast90Days"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "totalCommitsLastYear": {
            "type": "number"
          },
          "weeklyAvgLast90Days": {
            "type": "number"
          },
          "weeklyAvgPrior90Days": {
            "type": "number"
          },
          "weeklyCommits": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "commits": {
                  "type": "number"
                },
                "weekStart": {
                  "type": "string"
                }
              },
              "required": [
                "weekStart",
                "commits"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "repositoryFullName",
          "totalCommitsLastYear",
          "commitsLast90Days",
          "commitsLast30Days",
          "weeklyAvgLast90Days",
          "weeklyAvgPrior90Days",
          "activeContributorsLast90Days",
          "topContributors",
          "weeklyCommits"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "repositoryFullNames": {
      "description": "Repository full names for composition with other tools.",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "repositories",
    "repositoryFullNames"
  ],
  "type": "object"
}
```

## Related tools

Other GitHub API tools that this tool refers to, or that refer to it.

- [`searchRepositories`](https://kirha.com/providers/github/searchRepositories.md)

-----

[All GitHub API tools](https://kirha.com/providers/github.md) · [< Back to tools list](https://kirha.com/tools.md)