Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grassedge/detect-pull-reqs
Detect pull requests between two branches.
https://github.com/grassedge/detect-pull-reqs
github pull-request
Last synced: about 1 month ago
JSON representation
Detect pull requests between two branches.
- Host: GitHub
- URL: https://github.com/grassedge/detect-pull-reqs
- Owner: grassedge
- License: mit
- Created: 2019-12-30T11:52:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T04:35:36.000Z (almost 2 years ago)
- Last Synced: 2024-10-02T00:18:45.345Z (about 2 months ago)
- Topics: github, pull-request
- Language: JavaScript
- Size: 715 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# detect-pull-reqs
Detect pull requests between two branches.*example.js*
```javascript
const detect = require('detect-pull-reqs');(async function main([ name, base, head ]) {
const [ owner, repo ] = name.split('/');const pulls = await detect({
token: process.env.GITHUB_TOKEN,
owner,
repo,
base,
head
});// or pass octokit instance.
const Octokit = require('@octokit/rest')
const pulls = await detect({
octokit: Octokit({
...
}),
owner,
repo,
base,
head
});console.log(pulls.map(p => p.html_url));
})(process.argv.slice(2)).catch(e => console.log(e));
``````shell
$ GITHUB_TOKEN=... node index.js grassedge/detect-pull-reqs production master
# --> [ 'https://github.com/grassedge/detect-pull-reqs/pull/1' ]
```