Simple API to check eligibility of Repositories and Pull Requests for Hacktoberfest.
API is hosted here at the moment.
npm install and npm start
You also need a .env file with your Github Access Token (TOKEN).
GET /api/repo/:user/:repo- user: string - Owner of the Repository
- repo: string - Repository Name
Sends JSON with following properties if everything goes right:
- user: string - Owner of the Repository
- repo: string - Repository Name
- eligibile: boolean - Whether Repository is eligibile or not If not found, a Error response with code 404 is sent:
{
"code": 404,
"msg": "Not Found"
}GET /api/pr/:user/:repo/:pr_num- user: string - Owner of the Repository
- repo: string - Repository Name
- pr_num: number - Pull Request's Number
Sends JSON with following properties if everything goes right:
- user: string - Owner of the Repository
- repo: string - Repository Name
- pr_num: number - Pull Request's Number
- merged?: boolean - Whether PR is merged or not
- repoEligible?: boolean - Whether PR's Repository is eligibile or not
- eligibile?: boolean - Whether Repository is eligibile or not
- invalid?: boolean - Whether Repository is invalid (Spam) or not Else if something goes wrong, sends a similar error response like above.
I'm not so good with docs, you can PR improvments to Docs and Code both :)