Skip to content

Repository Questions

zhao-yue edited this page Mar 27, 2017 · 26 revisions

Intent Name: 'reposEarliestCommitter'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

<tbw>

Unique Utterances

  • How many contributors are on the <repo>?
  • Number contributors <repo>

Intent Name: 'reposLatestCommitter'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

<tbw>

Unique Utterances

  • How many contributors are on the <repo>?
  • Number contributors <repo>

Intent Name: 'contributorWithLeastCommits'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

<tbw>

Unique Utterances

  • How many contributors are on the <repo>?
  • Number contributors <repo>

Intent Name: 'contributorWithMostCommits'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

<tbw>

Unique Utterances

  • How many contributors are on the <repo>?
  • Number contributors <repo>

Intent Name: 'reposAverageCommitTime'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

<tbw>

Unique Utterances

  • How many contributors are on the <repo>?
  • Number contributors <repo>

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: 'numberOfFilesInRepo'
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: 'linkToRepo'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

var repo = await github.Repository.Get(repoOwner, repoName);
gitbotResponse = ($"Here is the link to {repoOwner}/{repoName}: {repo.HtmlUrl}");

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: 'noOfWatchersOfRepo'
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>?

Intent Name: 'noOfBranchesOfRepo'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

var github = new GitHubClient(new ProductHeaderValue("GitBot"));
if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; }
var branch = await github.Repository.Branch.GetAll(repoOwner, repoName);
gitbotResponse = ($"There are {branch.Count} branches in the repository");

Unique Utterances

  • How many branches in <repo>?
  • Number of branches <repo>
  • Number branches inside <repo>
  • What is the amount of branches on <repo>?
  • Give me number of branches on <repo>
  • Tell me the number of branches on <repo>
  • Get the number of branches on <repo>
  • Display the number of branches on <repo>
  • Amount of branches on <repo>?
  • How many branches does <repo> have?

Intent Name: 'noOfForksOfRepo'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

var github = new GitHubClient(new ProductHeaderValue("GitBot"));
if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; }
gitbotResponse = ($"There are {fork.Count} defined for the repository");

Unique Utterances

  • How many forks defined for <repo>?
  • How many times has the <repo> been copied
  • Number of times <repo> forked
  • The <repo> has been forked for how many times
  • Give me number of forked times of <repo>
  • Tell me the number of forked times on <repo>
  • Get the number of forked times on <repo>
  • Display <repo> has been copied for how many times
  • fork times <repo>
  • How many times has <repo> been forked?

Intent Name: 'noOfPullRequestsOfRepo'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

var github = new GitHubClient(new ProductHeaderValue("GitBot"));
if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; }
                            try
                            {
                                var requests = await github.Repository.PullRequest.GetAllForRepository(repoOwner, repoName);
                                if (requests.Count> 1)
                                    gitbotResponse = ($"There are {requests.Count} pull requests in {repoName} repo.");
                                else
                                    gitbotResponse = ($"There is {requests.Count} pull requests in {repoName} repo.");
                            } 
                            catch
                            {
                                gitbotResponse = ($"The repo \"{repoOwner}/{repoName}\" does not exist");
                            }

Unique Utterances

  • How many pull requests on ?
  • How many pull requests created on <repo>
  • Number of pull requests on<repo>
  • The <repo> has been forked for how many times
  • Give me number of pull requests of <repo>
  • Tell me the number of pull requests on <repo>
  • Get the number of pull requests on <repo>
  • Display <repo> has how many pull requests
  • pull requests quantity <repo>
  • what is the count of pull requests on ?

Intent Name: 'lastestPullRequestsOfRepo'
Entities involved: 'repoOwner', 'repoName'
GitHub Code:

var github = new GitHubClient(new ProductHeaderValue("GitBot"));
 if (repoOwner == null) { gitbotResponse = ($"I think you mean \"{intent}\" but I didn't see a repoOwner."); break; }
                            try
                            {
                                var requests = await github.Repository.PullRequest.GetAllForRepository(repoOwner, repoName);
                                gitbotResponse = ($"The lastest pull request on {repoOwner}/{repoName} was {requests.ElementAt(0).Title}");
                            }
                            catch
                            {
                                gitbotResponse = ($"The repo \"{repoOwner}/{repoName}\" does not exist");
                            }

Unique Utterances

  • What is the lastest pull request on ?
  • The lastest pull requests created on <repo>
  • The most recent pull request on <repo>
  • what is the lastest pull request <repo>
  • Give me latest pull requests of <repo>
  • Tell me last pull request on <repo>
  • Get the most recent pull request created on <repo>
  • Display <repo> latest pull requests
  • pull requests last <repo>
  • what is the name of latest pull requests on ?

Clone this wiki locally