Charting Commits in GitHub

In this scenario, you can track repository activity patterns by analyzing GitHub pull request events. This helps development teams understand project velocity and contribution patterns.

  • Track repository activity patterns

  • Identify peak contribution times

  • Monitor project velocity over time

  • Correlate pull request volume with sprint cycles

Visualization: The chart displays a single line graph showing GitHub pull request event frequency over a 30-minute period. Each data point represents the count of pull request events in a time bucket. The visualization shows activity patterns with a notable spike during periods of concentrated development work. A histogram at the top shows the event distribution across the time range. Hover over any point to see the exact event count and timestamp.

Screenshot showing a Time Chart widget displaying a blue line graph of GitHub pull request event frequency over 30 minutes from approximately 11:55 to 12:20, with a dramatic spike reaching about 45 events around 12:10-12:15 and low activity at the beginning and end, and a histogram at the top showing event distribution across the time range

Figure 254. Charting Commits in GitHub


Sample input data. Here is example input data for this scenario:

@timestampactorpayloadrepotype
1970-01-01T00:00:02HASH(0x55e226109038)HASH(0x55e2261087b0)HASH(0x55e2261088e8)PullRequestEvent
1970-01-01T00:00:02HASH(0x55e226103b60)HASH(0x55e226108e28)HASH(0x55e226108de0)PullRequestEvent
1970-01-01T00:00:02HASH(0x55e226109188)HASH(0x55e226108990)HASH(0x55e226109200)PullRequestEvent
1970-01-01T00:00:02HASH(0x55e2261093c8)HASH(0x55e2261092d8)HASH(0x55e226108d80)PullRequestEvent
1970-01-01T00:00:02HASH(0x55e2259fecc0)HASH(0x55e226109008)HASH(0x55e226108e58)PullRequestEvent

Query. To create this time chart, use the following query:

logscale
type = PullRequestEvent
| timeChart()

Query breakdown:

  1. Filter for events with type=PullRequestEvent to select only pull request-related activities.

  2. Use the timeChart() function without parameters to count all matching events.

  3. The function automatically buckets events by time and counts occurrences in each bucket.

  4. Result is a single time series showing pull request event frequency over time.

Configuration:

  1. From the Search page, type your query in the Query Editor → click Run

  2. Choose Time Chart in the Widget Selector

  3. Click the style icon : the side panel shows most settings already configured by default based on the query result.

  4. In Chart Type, the default Line is suitable for showing event frequency trends.

  5. In Series, configure the line color and style as preferred.

  6. In Y-Axis:

    • Set Title to Pull Request Events

    • Keep Scale as Linear

    • Set Format value to Metric

  7. In Time Range, adjust to show the desired time window. For concentrated activity patterns, a shorter range like Last 30m shows detailed spikes effectively.

  8. Optionally, in Horizontal line, add a reference line by entering a Label and Y-value to mark thresholds or baseline activity levels.

You can further customize this widget by setting more properties, see Time Chart Property Reference.