Skip to content

Commit

Permalink
Merge pull request #15 from bkeepers/search-each-repo
Browse files Browse the repository at this point in the history
Add repo to search query: duh!
  • Loading branch information
jbjonesjr authored Sep 8, 2017
2 parents 69e7510 + 1d74ee2 commit 8634d82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ module.exports = robot => {
const config = await context.config('probot-snooze.yml', JSON.parse(fs.readFileSync('./etc/defaults.json', 'utf8')));

const freeze = new Freeze(context.github, config);
const {owner, repo} = context.repo();
const q = `label:"${freeze.config.labelName}" repo:${owner}/${repo}`;

context.github.search.issues({q:'label:' + freeze.config.labelName, repo:context.repo().full_name}).then(resp => {
context.github.search.issues({q}).then(resp => {
resp.data.items.forEach(issue => {
context.github.issues.getComments(githubHelper.parseCommentURL(issue.comments_url)).then(resp => {
return freeze.getLastFreeze(resp.data);
Expand Down

0 comments on commit 8634d82

Please sign in to comment.