Features
"We have developed a robust Bitbucket plugin designed to streamline and enhance the development workflow by enforcing a series of checks through repository hooks. This plugin ensures the integrity of commits by requiring a matching Jira issue in the commit message, author name validation, and matching author and committer names and emails. Furthermore, it allows for the specification of regular expressions for author emails and branch names, providing flexibility in customizing the validation criteria.
The plugin incorporates a powerful feature to exclude merge commits, promoting a cleaner commit history. By implementing these checks, the plugin not only enhances the code quality but also enforces a higher standard for commit messages and authorship details.
In addition to these checks, the plugin introduces an innovative approach to pull request management. It enforces a condition to queue pull requests, ensuring a sequential and controlled merge process. This feature enhances collaboration by preventing concurrent merges, reducing the risk of conflicts, and maintaining a more structured and traceable development history.
The comprehensive nature of this Bitbucket plugin makes it an indispensable tool for development teams seeking to enforce best practices, maintain a clean commit history, and optimize their pull request workflow. By combining these features, the plugin contributes to a more efficient and organized development process within the Bitbucket environment."
1.1. Require Matching Jira Issue in Commit Message
Mandates the inclusion of a Jira issue in commit messages.
1.2. Author Name Checkers
Prevents commits with mismatched author names.
1.3. Require Matching Author Name in Bitbucket
Enforces matching author names within Bitbucket.
1.4. Require Matching Committer Name
Requires the committer name to match a specified value.
1.5. Require Matching Author Email
Ensures the author's email matches a specified value.
1.6. Require Matching Author Email in Bitbucket
Enforces matching author emails within Bitbucket.
1.7. Require Matching Committer Email
Requires the committer's email to match a specified value.
1.8. Author Email Regexp
Allows specifying a regex pattern for matching author emails.
2.1. Branch Name Regexp
Ensures branch names adhere to a specified regex pattern.
2.2. Exclude Merge Commits
Excludes merge commits, accepting only direct commits.
Prioritizes pull requests and prevents merging until predefined conditions are met.
Accessing the Project Settings Page:
After logging in to Bitbucket, click on the "Projects" tab located in the top-left corner.
And chose a project and click "Project Settings". After that click hooks, and you will see current hooks in bitbucket.
Once selected, you will be directed to a page similar to the following:
2. Accessing the Git Management Hook:
And on the content of the page , you will see hooks"
Click on "Git Management" and you will be greeted with an interface similar to the image below:
As seen in the hook above, there are many control structures, and whichever controls you want are selected, messages are added and the hook is enabled. If we assume that we have selected all of them and they are all incorrect and run them, it will give a result as seen in the picture below.
3. Accessing the Pull Request Page:
When you open a project you will see pull requests on the left side bar."
Click on "Pull Requests" and you will be greeted with an interface similar to the image below:
We added "Check Pull Request" modal dialog to set condition for pull requests.
When you click "Check Pull Request" and you will be greeted with an interface similar to the image below:
You can create some condition for your pull requests.
First, you will select a pull request, then you will set whether this selected pull request should be merged before or after the current request. After setting it, when you go to the pull request and if a condition is set, you will see a warning message as shown in the picture.