]> git.frustrated-labs.net Git - gradle-changelog-plugin.git/commitdiff
docs: add usage instructions to readme main
authorAlexander Goussas <[email protected]>
Wed, 29 Oct 2025 20:14:57 +0000 (15:14 -0500)
committerAlexander Goussas <[email protected]>
Wed, 29 Oct 2025 20:23:05 +0000 (15:23 -0500)
README.md

index 0e263286f77093e601b0182bf11f6dc6613282d8..9829e9ff754b95354b0662fba3d59683f70ccacd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,7 +10,48 @@ better if a CHANGELOG accurately reflects Git history and vice-versa.
 
 ## Usage
 
-TODO
+Add the plugin dependency in your gradle config:
+
+```groovy
+plugins {
+    id("io.github.aloussase.changelog")
+}
+```
+
+Then, execute the `changelog` task:
+
+```shell
+./gradlew changelog
+```
+
+On first run, if there is not a changelog file, it will be created. You can configure the name of the file:
+
+```groovy
+changelog {
+    format = "markdown"
+    fileName = "CHANGELOG.md"
+
+    git {
+        baseBranch = "main"
+        ignoreCommits = listOf(
+                "test",
+                "tests",
+                "readme",
+                "README"
+        )
+    }
+}
+```
+
+In this example configuration, you can see that we are setting the file name to `CHANGELOG.md`.
+
+We are also configuring the format to markdown, setting the base branch name against which to compare
+the current branch. This means that the changelog will be populated with the commits in the current
+branch that are not present in the base branch. This setup works with feature branches in mind.
+
+Lastly, we are also configuring keywords to ignore. In this example, any commits containing the words
+tests or readme will be excluded from the changelog. This helps keep the changelog nice and tidy, free
+from housekeeping commits.
 
 ## Integrating with Git hooks