Skip to content

Comando para auxiliar a criação de pull requests no TFS para simular um workflow de code review

Notifications You must be signed in to change notification settings

yuriclaure/tfs-pullrequest

Repository files navigation

Code review TFS

Installation

Please go to the releases tab in order to download the latest stable release.

The installer should install the command on your machine with no need for you to interviene.

Configuration

On your first execution of the command you will be asked for three informations, your TFS root URL, username and password.

After that your command will be ready for using

Commands available

$ cr feature

    This will list all features on your current repository.

$ cr feature [-f|--finish] {feature_name}

    This will create a new feature (branch) for you to work on.
    
    This command will always create a branch from master, so if you use ir from another feature, 
    it will not move or delete modifications you might have done
    
    If -f or --finish parameter is informed, it will try to finish feature {feature_name} instead of
    creating it. If you inform the -f parameter but does not inform {feature_name}, it will try
    to finish your current feature

$ cr move {feature_name}

    This command will switch your active feature to {feature_name}

$ cr review [[-t|--title] {pull_request_title}] [--hotfix]

    This command will create (or update) a pull request with your modifications and try to merge them on
    the master branch.
    
    The parameters -t or --title are used to inform the title of the pull request, if you do not inform
    any, it will use the last commit message as the title.
    
    If you try to create a pull request on master, it will first create a feature using your pull request
    title and then create a pull request accordingly.
    
    The parameter --hotfix is used if the changes are emergencial or do not need to be reviewed, i.e., the 
    pull request will be automatically merged into master.

$ cr share

    Pushes current feature to server without creating pull request, making it available for all users.

$ cr update

    Merge master branch into current feature and pulls any changes. (useful to resolve conflicts)

How to generate distribution (for those seeking to help with the project)

You will need to install PyInstaller and InnoSetup.

Then, follow these steps to generate the windows installer:

  1. Change the version of the software on main.py and /release/installation-script.iss, based on the release version you want to create.

  2. Go to the root folder (the repository root) and execute the following command:

    $ pyinstaller -n cr main.py -y

    This wil generate the files you need to install on the clients computer, you can see them on /dist/cr/

    pyinstaller is an alias for python pyinstaller.py

  3. Open the InnoSetup file located on /release/installation-script.iss

    Execute it, it will generate the installer called Codereview Installer.exe located on the /dist folder.

  4. Create a new release on GitHub with the same release version you set up on step one, and upload the windows installer. I generally also upload a zip file containing the contents from the /dist/cr folder so you have the option of just copying the files.

About

Comando para auxiliar a criação de pull requests no TFS para simular um workflow de code review

Resources

Stars

Watchers

Forks

Packages

No packages published