With Codebase, you can manage your code and repository changes easily, with a number of different tools included in the web interface.
Creating Merge Requests
Let's say we have finished working on a new feature, and we are ready to merge it with the master branch. But we don't want to just go ahead with the merge - some of our colleagues might be working on master now, so let's request a merge with them.
In this scenario we will act as both the person making the request, and the person who is repsonsible for approving it, so that we can see how it works from both sides.
Making a Merge Request
Let's start as the person making the request, by navigating to the repository we are making changes to, and click on the Merge Requests tab. From here, we can click New Merge Request, and fill out the necessary details in our new request:
- An optional subject to let our colleagues know what we are merging
- Source - the branch we are working on
- Destination - where we are requesting to merge to
- Responsible user - the main person who is looking after the destination branch
When we are happy, we can just click Create Merge Request, which submits it to our colleague who is responsible.
Verifying and Approving the Merge Request
Now as the person responsible, when we navigate to the repository, we will see a new request - highlighted by the Merge Requests tab, so let's have a look to see what this request is:
So we can see the new request, and click it's subject to check the details.
We can see that there are no potential conflicts if we action the merge as this point, so let's go ahead and approve it. The merge takes place now, and we can see it has successfully completed within our list of recent commits.
Our users love to see what great new features and improvements we are adding to our site, so why not publish a changelog showing all of these improvements.
Codebase allows us to automate the process easily, by publishing a changelog based on commits made to a repository. To enable this, we just need to navigate to Settings within our repository, and click Enabled under Public Changelog, and Update Properties at the bottom of the settings.
Once that change has been made, a url will be made available to us just below the Public Changelog setting, which when viewed. It looks like so:
In the Codebase UI, you can see a simple history of code changes within a subset of commits. Just navigate to a particular commit via the repository browser and commits tab, and click on either the commit ref or the commit message:
From here you can view changes made in the commit, with code highlighted in different colours to show where changes have been made via different commits.
A good example is shown below, where the pink highlighted line of code represents the previous version, and the green highlight is the most recent change.