dependable-bot v1.0.3
About The Project
- Feed CSV - Specify requirements - Check results
- Accepts a CSV of with names of projects and Repo links
- Outputs CSV specifing if a project satisfies the required dependency
- Create PR to upgrade the dependency
- Single flag to create pull requests to upgrade the dependency on required Repos
- Adds a column with pull request links to the Output CSV
Getting Started
Prerequisites
You're required to install
nodeJSandnpmto run the app, follow this link to installation.You will also need to clone the repository follow this link to install git
You will also need a personal access token from your github account, instructions. Make sure you have the following permissions checked :
- repo
- repo:status Access commit status
- repo_deployment Access deployment status
- public_repo Access public repositories
- repo:invite Access repository invitations
- security_events
- admin:org
- write:org
- read:org
- user
- read:user
- user:email
- user:follow
Installation
# Clone this repository
$ git clone https://github.com/Dark0017/dependable-bot
# Go into the repository
$ cd dependable-bot
# Install dependencies
$ npm install
# Run the app in the csv directory
$ depend-bot startNote Checkout CSV Specifications to format your CSV file
Usage Example
Commands
hi- Say hi to dependable bot
- To check if bot is working
$ depend-bot hi
start- Start dependable bot
Required flags:
-i: specify the csv file name-t: specify your github access tokenRequired argument:
<dependency>: dependency that will be checked, dependency needs to follow the syntax<name>@<version>such asaxios@0.23.0
$ depend-bot start -u -i data.csv -t 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 grunt@1.5.3Note Generate your own personal access token for the token flag from github
CSV Specifications
- Dependable bot accepts a CSV with 2 columns
nameandrepo(case sensitive) namecolumn contains the name of the projectrepocolumn contins the URL to the github repo of the project
A sample of a valid CSV file is given below
| name | repo |
|---|---|
| dark-react-sample-app | https://github.com/dark-in/react-sample-app/ |
| dark-js-sample-app | https://github.com/dark-in/javascript-sample-app |
| dark-sample-app-backend | https://github.com/dark-in/backend-sample-app |
Sample output CSV
| name | repo | version | version_satisfied |
|---|---|---|---|
| dark-react-sample-app | https://github.com/dark-in/react-sample-app/ | 0.24.0 | true |
| dark-js-sample-app | https://github.com/dark-in/javascript-sample-app | 0.21.1 | false |
| dark-sample-app-backend | https://github.com/dark-in/backend-sample-app | 0.23.0 | true |
Sample output CSV with update option
Should give an output like:
| name | repo | version | version_satisfied | update_pr |
|---|---|---|---|---|
| dark-react-sample-app | https://github.com/dark-in/react-sample-app/ | 0.24.0 | true | |
| dark-js-sample-app | https://github.com/dark-in/javascript-sample-app | 0.21.1 | false | https://github.com/dark-in/javascript-sample-app/pull/3 |
| dark-sample-app-backend | https://github.com/dark-in/backend-sample-app | 0.23.0 | true |
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Ayushman Singh - @Ayushma81703243 - singh.ayush8827@gmail.com

