-
Notifications
You must be signed in to change notification settings - Fork 2
Repository Questions
Yasir Zardari edited this page Mar 10, 2017
·
26 revisions
- Number of contributors on a repository
- Number of files in a repository
- Number of watchers in a repository
Intent Name: 'numberOfContributorsOnARepo'
Entities involved: 'repository'
GitHub Code:
if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; } 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>
- 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>
Intent Name: 'numberOfFilesInRepo'
Entities involved: 'repository'
GitHub Code:
if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; }
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 the
<repo>
? - Number files
<repo>
- What is the amount of files in the
<repo>
? - Give me number of files in the
<repo>
- Tell me the number of files in the
<repo>
- Get the number of files in the
<repo>
- Display the number of files in the
<repo>
- Amount of files in the
<repo>
? - Show me number of files in the
<repo>
- What is the count of files in the
<repo>
?
Intent Name: 'noOfWatchersOfRepo'
Entities involved: 'repository'
GitHub Code:
if (user == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a user."); break; }
var watchers = await github.Activity.Watching.GetAllWatchers(repoOwner, repoName);
gitbotResponse = ($"Watchers are {watchers.Count}");
Unique Utterances
- How many wacthers are in the
<repo>
? - Number watchers
<repo>
- What is the amount of watchers in the
<repo>
? - Give me number of watchers in the
<repo>
- Tell me the number of watchers in the
<repo>
- Get the number of watchers in the
<repo>
- Display the number of watchers in the
<repo>
- Amount of watchers in the
<repo>
? - Show me number of watchers in the
<repo>
- What is the count of watchers in the
<repo>
?
If you want to get in touch with us about GitBot, you can send an email to nating@tcd.ie