Skip to content

Implement MonthlyCommitAndReviewActivityTrigger for collecting users with commit/review activity - #307

Open
konard wants to merge 3 commits into
mainfrom
issue-92-03d9e5dc
Open

Implement MonthlyCommitAndReviewActivityTrigger for collecting users with commit/review activity#307
konard wants to merge 3 commits into
mainfrom
issue-92-03d9e5dc

Conversation

@konard

@konard konard commented Sep 13, 2025

Copy link
Copy Markdown
Member

Summary

Implements a new GitHub bot trigger to solve issue #92: "Collect users who made commits and/or reviews in the specified month using GitHub Bot or GitHub API."

Key Features

  • New Trigger: MonthlyCommitAndReviewActivityTrigger responds to issues with titles containing "monthly commit and review activity" or "collect users who made commits"
  • Date Parsing: Extracts month and year from issue body in format month: X and year: Y
  • Repository Filtering: Supports ignoring repositories via Lino-formatted links (ignore repo_name repository.)
  • GitHub API Integration: Uses Octokit to fetch commits and pull request reviews within specified date range
  • Comprehensive Results: Returns formatted list of users with their commit and review activities
  • Error Handling: Provides helpful error messages and defaults to previous month if dates not specified

Usage Example

Issue Title: Monthly commit and review activity for November 2023

Issue Body:

month: 11
year: 2023

ignore test-repo repository.
ignore archived-repo repository.

Response Format:

# Users with commit and/or review activity in November 2023

**Total active users: 5**

## @alice
Activities (7):
- Commit in project-a: Add new authentication module
- Review in project-b: PR #123 - Update documentation
- ... and 5 more activities

Implementation Details

  • GitHub API Usage: Leverages existing GitHubStorage class with Octokit
  • Date Range Filtering: Searches commits and reviews within the entire specified month
  • Activity Tracking: Records both commit messages and pull request review details
  • Performance: Processes all organization repositories with proper filtering
  • Integration: Seamlessly integrated with existing bot trigger system

Files Added/Modified

  • csharp/Platform.Bot/Triggers/MonthlyCommitAndReviewActivityTrigger.cs - Main implementation
  • csharp/Platform.Bot/Program.cs - Added trigger to IssueTracker
  • examples/MonthlyActivityTrigger_Usage.md - Usage documentation
  • examples/TestMonthlyActivityTrigger.cs - Test example

Test Plan

  • Code compiles successfully with existing codebase
  • Follows existing code patterns and conventions
  • Integrates with existing trigger system
  • Includes comprehensive error handling
  • Provides clear usage documentation

🤖 Generated with Claude Code


Resolves #92

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #92
@konard konard self-assigned this Sep 13, 2025
- Add new trigger to collect users who made commits and/or reviews in a specified month
- Parse month/year from issue body in format "month: X" and "year: Y"
- Support ignoring repositories via Lino-formatted links
- Use GitHub API to fetch commits and pull request reviews within date range
- Format results with user activity summary and detailed activity list
- Include usage documentation and test example
- Integrate trigger with existing IssueTracker in Program.cs

Solves: Collect users who made commits and/or reviews in the specified month using GitHub Bot or GitHub API

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Collect users who made commits and/or reviews in the specified month using GitHub Bot or GitHub API Implement MonthlyCommitAndReviewActivityTrigger for collecting users with commit/review activity Sep 13, 2025
@konard
konard marked this pull request as ready for review September 13, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect users who made commits and/or reviews in the specified month using GitHub Bot or GitHub API

1 participant