Skip to content

Commit dc6c8bc

Browse files
Open-Source Contribution Submission (#2662)
* Create README.md * Update formatting * update broken link
1 parent 00aecba commit dc6c8bc

File tree

1 file changed

+40
-0
lines changed
  • contributions/open-source/maals-omidfm

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Assignment Proposal
2+
3+
### Title
4+
Fixing unnoticed commits of unstaged changes with bump in Commitizen
5+
### Names and KTH ID
6+
- Marcus Alström ([email protected])
7+
- Omid Fattahi Mehr ([email protected])
8+
9+
### Deadline
10+
Task 3
11+
12+
### Category
13+
Open source
14+
15+
### Description
16+
Commitizen is an open source release management tool, that automatically creates commits in a standard way and updates versioning. It is actively used and popular with 2.5k stars with an active community. Bump is a tool within Commitizen that allows automated updating of the version of the project, which is managed by version provider files, such as pyproject.toml or Cargo.toml. Bump will automatically update the version of the project within the version file, it will add all tracked files to staging, create a changelog, and commit these files with a git tag corresponding to the new version.
17+
18+
The problem: There has been an ongoing [issue](https://github.com/commitizen-tools/commitizen/issues/1194) where the project has been bumped up with uncommitted changes that could go unnoticed. This could lead to breaking changes being included in the new version of the project.
19+
20+
Our first idea was to simply abort any bump if there were unstaged changes. However, after a short discussion with one of the maintainers we agreed that the best solution would be to only add the version files and let any unstaged changes remain unstaged.
21+
22+
23+
24+
Before starting, we took time to:
25+
- Understand the tool and Commitizen's source code.
26+
- Set up Commitizens development environment ensuring everything is working correctly.
27+
28+
Solved the issue by:
29+
- Finding a way to retrieve the version files for all the different version providers
30+
- Updating the corresponding source code file that handles the bump command to only add and commit the version files
31+
- Updating documentation
32+
- Adding relevant test cases
33+
- Making sure our test coverage has not dropped
34+
- Formatting all the changes according to Commitizens standard
35+
36+
[Our pull request can be found here](https://github.com/commitizen-tools/commitizen/pull/1261) and we are currently awaiting review from the maintainers.
37+
38+
39+
**Relevance**
40+
Commitizen is a tool with an important application in managing commits and versioning, which is an important part of DevOps (especially in CI/CD pipelines) and helps teams structure their commits and be on track. First, automation is key in DevOps, and so Commitizen provides a structured and consistent approach to creating commit messages that are consistent and easy to follow. In addition it can analyze commits to determine the next version and automatically change the version of a project and create tags, changelogs, and releases. Some tools in DevOps, such as Jenkins work well with structured commit messages and can do actions based on certain patterns. Also, an important aspect in DevOps is good communication between developers, which can be more easily facilitated by using standardized commit messages.

0 commit comments

Comments
 (0)