It is a github & gitlab API Wrapper packaged into one server, It was built in Python3 & Flask, It contains minimal API interactions which were implemented to get only the required information from the respective github & gitlab APIs, I built this project under alice-sieve organization.
To use this project.
- Install dependencies & export environment variables.
$ sudo -H pip3 install -r requirements.txt
- Start project using
$ cd src
$ python3 server.py
- Add a file structure here with the basic details about files, below is an example.
.
├── LICENSE
├── logo
│ └── api.png
├── Procfile
├── README.md
├── requirements.txt
└── src
├── GithubToken.py
├── GithubWrapper.py
├── GitlabToken.py
├── GitlabWrapper.py
└── server.py
2 directories, 10 files
- Code Style
In order to maintain the code style consistency across entire project I use a code formatter. I kindly suggest you to do the same whenever you push commits to this project.
The python code formatter I chose is called Black. It is a great tool and it can be installed quickly by running
sudo -H pip3 install black
or
python3.6 -m pip install black
It requires Python 3.6.0+ to run.
- Usage
black {source_file_or_directory}
For more details and available options, please check their psf/black.
I also use isort, it is a Python utility / library to sort imports alphabetically, and automatically separated into sections. It provides a command line utility which can be installed using.
sudo -H pip3 install isort
- Usage
isort {source_file}.py
For more details and available options, please check their timothycrosley/isort.
- Close Issues
Close issues using keywords: how to ?
- GitHub API Documentation : describes the resources that make up the official GitHub REST API v3.
- GitLab API Documentation : describes the resources that make up the official GitLab REST API.
- GET organizations/ group members
GET /github/orgs/:org/members
GET /gitlab/groups/:id/members
- GET organizations repos/ group projects
GET /github/orgs/:org/repos
GET /gitlab/groups/:id/projects
- GET repos commits / projects commits
GET /github/repos/:owner/:repo/commits
GET /gitlab/projects/:id/repository/commits
- GET repo issues / projects issues
GET /github/repos/:owner/:repo/issues
GET /gitlab/projects/:id/issues
- GET organization issues / groups issues
GET /github/orgs/:org/issues
GET /gitlab/groups/:id/issues
- GET repo issues comments/ project issue comments
GET /github/repos/:owner/:repo/issues/comments
GET /gitlab/projects/:id/issues/:issue_iid/notes
- GET repo pull requests / project merge requests
GET /github/repos/:owner/:repo/pulls
GET /gitlab/projects/:id/merge_requests