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
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,20 @@ Prints out the help messages of the modules whose names have been specified. If

### First Timers Only
`trigger` **message**
`keyword` **fto**
`keyword` **fto repo-name**

Prints out all the issues in the specified publiclab repositories labelled 'first-timers-only'. If no repositories are mentioned, the user is asked to do so.

### Approve
`trigger` **message**
`keyword` **approve nickname**
Moderators only: sends an unquiet command so a user can post messages, and a voice confirmation.

### Version
`trigger` **message**
`keyword` **version**
Prints out Plotsbot package version.

## Submitting Behaviors

If you want to submit your own behavior, your pull request needs to be self-contained. That is, it requires the following essential components:
Expand Down
17 changes: 16 additions & 1 deletion src/behaviors/fto.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@ module.exports = ({ github }) => {
if (options.length > 0) {
return Promise.all(options.map(ftoRepo)).then(repos => repos.join('\n\n'));
} else {
return 'You need to mention the name of a repository.';
let answer = 'You need to mention the name of a repository.';

// github.repos.getForOrg({org: 'publiclab',})
// .then(data=>{
// let names = '';
// data.data.map(repo=>{
// if (repo.visibility === 'public' && repo.has_issues) {
// names += repo.name
// // Promise.all(repo.map(ftoRepo)).then(repo => console.log('repo', repo));
// answer += `\n${repo.name}: ${repo.description}`;
// }
// })
// }).catch(err => {
// console.log(err)
// });
return answer;
}
};

Expand Down