-
Notifications
You must be signed in to change notification settings - Fork 2
Repository Questions
Geoff Natin edited this page Mar 11, 2017
·
26 revisions
Intent Name: 'reposContributorCount'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:
var github = new GitHubClient(new ProductHeaderValue("GitBot"));
var contributors = await github.Repository.GetAllContributors(repoOwner, repoName);
if (contributors.Count > 1)
gitbotResponse = ($"There are {contributors.Count} contributors in {repoName} repo.");
else
gitbotResponse = ($"There is {contributors.Count} contributor in {repoName} repo.");
Unique Utterances
- How many contributors are on the
<repo>? - Number contributors
<repo> - Number contributing
<repo> - What is the amount of contributors on
<repo>? - Give me number of contributors on
<repo> - Tell me the number of contributors on
<repo> - Get the number of contributors on
<repo> - Display the number of contributors on
<repo> - Amount of contributors on
<repo>? - Show me number of contributors on
<repo> - How much contributors on
<repo>? - How many contributors does
<repo>have? - How many people contribute to
<repo>? - How many users are contributing on
<repo>?
Intent Name: 'reposFileCount'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:
var github = new GitHubClient(new ProductHeaderValue("GitBot"));
var contents = await github.Repository.Content.GetAllContents(repoOwner, repoName);
if (contents.Count > 1)
gitbotResponse = ($"There are {contents.Count} files in {repoName} repo.");
else
gitbotResponse = ($"There is {contents.Count} file in {repoName} repo.");
Unique Utterances
- How many files are in
<repo>? - Number files
<repo> - What is the amount of files in
<repo>? - Give me number of files in
<repo> - Tell me the number of files in
<repo> - Get the number of files in
<repo> - Display the number of files in
<repo> - Amount of files in
<repo>? - Show me number of files in
<repo> - What is the count of files in
<repo>?
Intent Name: 'repositorysLink'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:
gitbotResponse = ($"Here's a link to {repoOwner}/{repoName}: https://github.com/{repoOwner}/{repoName}");
Unique Utterances
<repo>- Show me
<repo> - Give me
<repo>'s profile - What's the link to
<repo> -
<repo>profile -
<repo>page - Profile
<repo> - Link for
<repo> - Get
<repo> - Where can I find
<repo> - Where's
<repo>
Intent Name: 'repositorysWatcherCount'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:
var github = new GitHubClient(new ProductHeaderValue("GitBot"));
var watchers = await github.Activity.Watching.GetAllWatchers(repoOwner, repoName);
gitbotResponse = ($"Watchers are {watchers.Count}");
Unique Utterances
- How many people are watching
<repo>? - Number watchers
<repo> - What is the amount of watchers in
<repo>? - Give me number of users watching
<repo> - Tell me the number of people who watch
<repo> - Get the number of watchers
<repo>has - Number of users who clicked watch on
<repo> - Amount of watchers in
<repo>? - Show me number of watchers in
<repo> - What is the count of watchers in
<repo>?
If you want to get in touch with us about GitBot, you can send an email to nating@tcd.ie