Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knrt10/probot-repos
Probot extension for events that return undefined
https://github.com/knrt10/probot-repos
Last synced: 13 days ago
JSON representation
Probot extension for events that return undefined
- Host: GitHub
- URL: https://github.com/knrt10/probot-repos
- Owner: knrt10
- License: mit
- Created: 2018-04-21T11:08:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-21T13:47:33.000Z (almost 7 years ago)
- Last Synced: 2024-12-14T19:23:13.790Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# probot-repos
Probot extension for events that return **undefined**# What's its importance ?
Some github events like `installation` & `installation_repositories` does not work for probot's
`context.repo()` as they return **undefined** because in that case their payload does not store values for which **repository/repositories** were added. This is just a simple hack for helping developers using probot to avoid writing large amount of code. :smile: :fire:# Installation
1.) Install using npm `npm i probot-repos --save`
# Usage
```js
const repos = require('probot-repos')
robot.on('installation.created', context => {
repos(context).then((val) => {
// val will return array of repositories added .
[ { repo: 'Awesome-Hacking', owner: 'USERNAME' },
{ repo: 'autolabeler', owner: 'USERNAME' } ]
})
})
```
Enjoy coding :peace_symbol: