Skip to content

Latest commit

 

History

History
64 lines (55 loc) · 2.75 KB

README.md

File metadata and controls

64 lines (55 loc) · 2.75 KB

Visirion Bot


Proposed Solution

This app is used for automated merge, rebase, squashing, fast forwarding of pull requests on version control systems, like Github.
It acts as a chatbot to make it easy for new developers to manage large codebases, by enabling them to use basic commands on the Github comments section.

Workflow

  • Fork the original repository of the organisation or user.
  • Checkout to some branch.
  • Push to your branch.
  • Compare and send pull request.
  • Once the maintainer reviews the pull request he will trigger the bot as:
    @visirionrebase
  • Wait for visirion to perform rebase, once done all the changes will be in sync with master.

How to Set up (Only for maintainers)

  • Clone and download the repository:
    git clone https://github.com/jay24rajput/Vision-Bot.git
  • Install dependencies:
    pip3 install -r requirements.txt --user
  • Run the server:
    python3 manage.py runserver
  • Publish the localhost as:
    ngrok http -host-header=rewrite localhost:8000
  • Create webhooks for your repository:
    Webhooks for github
  • Enter the http address from the ngrok:
    eg: http://6712e41e.ngrok.io
  • Generate and Enter the secret key
$ python manage.py shell
   from django.utils.crypto import get_random_string
   get_random_string(50)
  • Update webhook and deliver the request and check the response.

Perfoming Rebase

When not doing a fast forward merge, your git history looks like this:
bad-history

Chaos. This makes it pretty difficult to figure out what code is where and when and how it got there. When you rebase and only do fast forward merges, you get a git history that looks like this:
clean-history
A nice, clean, straight line. This makes it sooooo much nicer!

This is how the Visirion Bot performs Rebasing

Rebase%20Message

Future Scope

  • Can be integrated into a github app by providing the required urls.
  • We can integrate the project with Chatter Bot APIS to add more functionality to Visirion
  • Different Scenarios for merge conflicts, force pushes, etc. can also be incorporated.

Contributors