Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion csharp/Platform.Bot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static async Task<int> Main(string[] args)
var dbContext = new FileStorage(databaseFilePath?.FullName ?? new TemporaryFile().Filename);
Console.WriteLine($"Bot has been started. {Environment.NewLine}Press CTRL+C to close");
var githubStorage = new GitHubStorage(githubUserName, githubApiToken, githubApplicationName);
var issueTracker = new IssueTracker(githubStorage, new HelloWorldTrigger(githubStorage, dbContext, fileSetName), new OrganizationLastMonthActivityTrigger(githubStorage), new LastCommitActivityTrigger(githubStorage), new AdminAuthorIssueTriggerDecorator(new ProtectDefaultBranchTrigger(githubStorage), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationRepositoriesDefaultBranchTrigger(githubStorage, dbContext), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationPullRequestsBaseBranchTrigger(githubStorage, dbContext), githubStorage));
var issueTracker = new IssueTracker(githubStorage, new HelloWorldTrigger(githubStorage, dbContext, fileSetName), new OrganizationLastMonthActivityTrigger(githubStorage), new LastCommitActivityTrigger(githubStorage), new TopByTechnologyTrigger(githubStorage), new AdminAuthorIssueTriggerDecorator(new ProtectDefaultBranchTrigger(githubStorage), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationRepositoriesDefaultBranchTrigger(githubStorage, dbContext), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationPullRequestsBaseBranchTrigger(githubStorage, dbContext), githubStorage));
var pullRequenstTracker = new PullRequestTracker(githubStorage, new MergeDependabotBumpsTrigger(githubStorage));
var timestampTracker = new DateTimeTracker(githubStorage, new CreateAndSaveOrganizationRepositoriesMigrationTrigger(githubStorage, dbContext, Path.Combine(Directory.GetCurrentDirectory(), "/github-migrations")));
var cancellation = new CancellationTokenSource();
Expand Down
23 changes: 23 additions & 0 deletions csharp/Platform.Bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,26 @@ dotnet run MyNickname ghp_123 MyAppName db.links HelloWorldSet
```shell
./run.sh NICKNAME TOKEN APP_NAME
```

## Features

The bot responds to GitHub issues with specific triggers:

- **Hello World**: Create issues with title "hello world" to test the bot
- **Organization Last Month Activity**: Create issues with title "organization last month activity" to get member activity
- **Top by Technology**: Create issues with title "Top by technology [TECHNOLOGY_NAME]" to get users ranked by their activity with specific technologies

### Top by Technology

The "Top by technology" feature analyzes repositories in your organization and ranks users based on:
- Commit activity in repositories that contain the specified technology
- Overall contribution activity weighted by technology usage
- Repository language analysis and file patterns

Example usage:
- "Top by technology CUDA" - Find users working with CUDA
- "Top by technology Qt" - Find users working with Qt
- "Top by technology Docker" - Find users working with Docker
- "Top by technology React" - Find users working with React

The bot will analyze the last 3 months of activity and return the top 10 contributors for the specified technology.
Loading
Loading