GLPublisher is a small script that can be used to publish a pre-defined set of changes to a list of gitlab projects. "Publish" here means the following things:
- Create an issue for each project
- The issue title is defined in
config.json
, and the issue content can be pre-written inissue.md
- If the issue has a same title already exists, GLPublisher won't make a new issue. Instead, it will make sure the issue has the same content with the file.
- The issue title is defined in
- Create a branch
- The branch name has a convention of
issue_{issue_number}_{suffix_defined}
.issue_number
is from the above step, andsuffix_defined
is defined inconfig.json
.
- The branch name has a convention of
- Create a Merge request from the above created branch.
- Commit changes defined in
config.json
.
You will need to have pipenv to set it up and running. (For sure you can ignore that and pick up the requirements and install them on your global python. And if you understand what that means, go ahead.)
Make sure you have an environment variable named GITLAB_ACCESS_TOKEN
that you can get from your Gitlab settings.
# The paper work: clone the repository and cd into it
$ pipenv install --dev # Install all the dependencies
$ pipenv shell # Spawns a shell within the virtualenv
# Fill in issue.md and config.json for necessary information
$ pipenv run python publisher.py
TODO