{"id":14066493,"url":"https://github.com/kapsner/autonewsmd","last_synced_at":"2025-05-04T13:30:47.390Z","repository":{"id":58130046,"uuid":"529495568","full_name":"kapsner/autonewsmd","owner":"kapsner","description":"Auto-Generate Changelog using Conventional Commits","archived":false,"fork":false,"pushed_at":"2024-05-16T14:27:26.000Z","size":112,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-16T15:27:10.941Z","etag":null,"topics":["automation","changelog-generator","conventional-commits","cran","r","r-package"],"latest_commit_sha":null,"homepage":"https://cran.r-project.org/web/packages/autonewsmd/vignettes/autonewsmd.html","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapsner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-27T05:50:16.000Z","updated_at":"2024-05-27T13:39:07.286Z","dependencies_parsed_at":"2024-02-19T18:25:47.849Z","dependency_job_id":"f157ea04-4098-4dd9-83e1-5ee99a6ca384","html_url":"https://github.com/kapsner/autonewsmd","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2Fautonewsmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2Fautonewsmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2Fautonewsmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2Fautonewsmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapsner","download_url":"https://codeload.github.com/kapsner/autonewsmd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224392021,"owners_count":17303652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","changelog-generator","conventional-commits","cran","r","r-package"],"created_at":"2024-08-13T07:05:07.855Z","updated_at":"2024-11-13T04:57:39.178Z","avatar_url":"https://github.com/kapsner.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"\n\n# autonewsmd\n\n\u003c!-- badges: start --\u003e\n\n[![](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![](https://www.r-pkg.org/badges/version/autonewsmd)](https://cran.r-project.org/package=autonewsmd)\n[![CRAN\nchecks](https://badges.cranchecks.info/worst/autonewsmd.svg)](https://cran.r-project.org/web/checks/check_results_autonewsmd.html)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/autonewsmd?color=blue)](https://cran.r-project.org/package=autonewsmd)\n[![](http://cranlogs.r-pkg.org/badges/last-month/autonewsmd?color=blue)](https://cran.r-project.org/package=autonewsmd)\n[![Dependencies](https://tinyverse.netlify.app/badge/autonewsmd)](https://cran.r-project.org/package=autonewsmd)\n[![R build\nstatus](https://github.com/kapsner/autonewsmd/workflows/R%20CMD%20Check%20via%20%7Btic%7D/badge.svg)](https://github.com/kapsner/autonewsmd/actions)\n[![R build\nstatus](https://github.com/kapsner/autonewsmd/workflows/lint/badge.svg)](https://github.com/kapsner/autonewsmd/actions)\n[![R build\nstatus](https://github.com/kapsner/autonewsmd/workflows/test-coverage/badge.svg)](https://github.com/kapsner/autonewsmd/actions)\n[![](https://codecov.io/gh/https://github.com/kapsner/autonewsmd/branch/main/graph/badge.svg)](https://codecov.io/gh/https://github.com/kapsner/autonewsmd)\n\n\u003c!-- badges: end --\u003e\n\nThe purpose of the `autonewsmd` R package is to bring the power of\nconventional commit messages to the R community. There is no need\nanymore to tediously maintain a changelog file manually. If you are\nusing conventional commit messages, `autonewsmd` will do that for you\nand automatically generate a human readable changelog file directly from\nthe repository’s git history.\n\nConventional commit messages\n(\u003chttps://www.conventionalcommits.org/en/v1.0.0/\u003e) come with some easy\nrules to create human readable commit messages for a git history. One\nadvantage is that following these conventions, these messages are also\nmachine readable and automated tools can run on top of them in order to,\ne.g., generate beautiful changelogs out of them. Similar tools written\nin other programming languages are, for example,\n[`auto-changelog`](https://github.com/cookpete/auto-changelog) for\nJavaScript and\n[`auto-changelog`](https://github.com/KeNaCo/auto-changelog) for Python.\n\n## Installation\n\nYou can install `autonewsmd` with:\n\n``` r\ninstall.packages(\"autonewsmd\")\n```\n\nYou can install the development version of `autonewsmd` with:\n\n``` r\ninstall.packages(\"remotes\")\nremotes::install_github(\"kapsner/autonewsmd\")\n```\n\n## Supported Commit Types\n\nThe default changelog template organizes commits according to their\nassociation with specific tags. The tags form the headings of the\nchangelog file and are sorted in decreasing order according to their\nrelease dates. The following table lists the commit types that are\ncurrently supported by `autonewsmd`. To be correctly recognized by\n`autonewsmd`, it is important that the formatting of the commit messages\nfollow the conventions described\n[here](https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with--to-draw-attention-to-breaking-change).\n\n\u003ccenter\u003e\n\n| Type      | Changelog Subheading |\n|-----------|----------------------|\n| feat:     | New features         |\n| fix:      | Bug fixes            |\n| refactor: | Refactorings         |\n| perf:     | Performance          |\n| build:    | Build                |\n| test:     | Tests                |\n| ci:       | CI                   |\n| docs:     | Docs                 |\n| style:    | Style                |\n| chore:    | Other changes        |\n\n\u003c/center\u003e\n\nIf any commit type includes `BREAKING CHANGE` in its commit message’s\nbody or footer, the subheading **`Breaking changes`** is included as\nfirst subheading within the respective sections. Furthermore, the\ndetection of breaking changes using the exclamation mark (`!`) between\nthe type description and the colon (as described\n[here](https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with--to-draw-attention-to-breaking-change))\nis supported as well.\n\n## Example\n\nFirst of all, create a small repository with some commit messages.\n\n``` r\nlibrary(autonewsmd)\n\n# (Example is based on the public examples from the `git2r` R package)\n## Initialize a repository\npath \u003c- file.path(tempdir(), \"autonewsmd\")\ndir.create(path)\nrepo \u003c- git2r::init(path)\n\n## Config user\ngit2r::config(repo, user.name = \"Alice\", user.email = \"alice@example.org\")\ngit2r::remote_set_url(repo, \"foobar\", \"https://example.org/git2r/foobar\")\n\n## Write to a file and commit\nlines \u003c- \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do\"\nwriteLines(lines, file.path(path, \"example.txt\"))\n\ngit2r::add(repo, \"example.txt\")\ngit2r::commit(repo, \"feat: new file example.txt\")\n\n## Write again to a file and commit\nSys.sleep(2) # wait two seconds, otherwise, commit messages have same time stamp\nlines2 \u003c- paste0(\n  \"eiusmod tempor incididunt ut labore et dolore magna aliqua. \",\n  \"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris \",\n  \"nisi ut aliquip ex ea commodo consequat.\"\n)\nwrite(lines2, file.path(path, \"example.txt\"), append = TRUE)\n\ngit2r::add(repo, \"example.txt\")\ngit2r::commit(repo, \"refactor: added second phrase\")\n\n## Also add a tag here\ngit2r::tag(repo, \"v0.0.1\")\n```\n\nThen, instantiate an `autonewsmd` object. Here, you must provide the\n`repo_name` (this argument is used to compose the title of the changelog\nfile). The `repo_path`-argument can be provided optionally and defaults\nto the current working directory (`\".\"`). The `repo_path` should be the\nroot of a git repository. The `$generate()`-method creates a list with\nall commit messages that is used for rendering the changelog file.\n\n``` r\nan \u003c- autonewsmd$new(repo_name = \"TestRepo\", repo_path = path)\nan$generate()\n```\n\nExecuting the `$write()`-method, the changelog is written to the path\nspecified with the `repo_path`-argument. If `force = FALSE` (the\ndefault), a dialog is prompted to ask the user if the file should be\n(over-) written.\n\n``` r\nan$write(force = TRUE)\n```\n\nNow, we can verify that the file `NEWS.md` also appears in the git\nfolder and check its content.\n\n``` r\nlist.files(path)\n#\u003e [1] \"example.txt\" \"NEWS.md\"\n```\n\n``` r\nnewsmd \u003c- readLines(file.path(path, \"NEWS.md\"))\nnewsmd\n#\u003e  [1] \"# TestRepo NEWS\"                                                                                \n#\u003e  [2] \"\"                                                                                               \n#\u003e  [3] \"## v0.0.1 (2022-08-27)\"                                                                         \n#\u003e  [4] \"\"                                                                                               \n#\u003e  [5] \"#### New features\"                                                                              \n#\u003e  [6] \"\"                                                                                               \n#\u003e  [7] \"-   new file\"                                                                                   \n#\u003e  [8] \"    ([22b8453](https://example.org/git2r/foobar/tree/22b845346a0f3686d79eb86445af6be71dc86da6))\"\n#\u003e  [9] \"\"                                                                                               \n#\u003e [10] \"#### Refactorings\"                                                                              \n#\u003e [11] \"\"                                                                                               \n#\u003e [12] \"-   added second phrase\"                                                                        \n#\u003e [13] \"    ([ec510eb](https://example.org/git2r/foobar/tree/ec510ebb465d25ab7ad27e8b637cf4113b55cbdf))\"\n#\u003e [14] \"\"                                                                                               \n#\u003e [15] \"Full set of changes:\"                                                                           \n#\u003e [16] \"[`22b8453...v0.0.1`](https://example.org/git2r/foobar/compare/22b8453...v0.0.1)\"\n```\n\n## Used By\n\n[autonewsmd](https://github.com/kapsner/autonewsmd/blob/main/NEWS.md),\n[sjtable2df](https://github.com/kapsner/sjtable2df/blob/main/NEWS.md),\n[rBiasCorrection](https://github.com/kapsner/rBiasCorrection/blob/master/NEWS.md),\n[BiasCorrector](https://github.com/kapsner/BiasCorrector/blob/master/NEWS.md),\n[DIZtools](https://github.com/miracum/misc-diztools/blob/main/NEWS.md),\n[DIZutils](https://github.com/miracum/misc-dizutils/blob/master/NEWS.md),\n[DQAstats](https://github.com/miracum/dqa-dqastats/blob/master/NEWS.md),\n[DQAgui](https://github.com/miracum/dqa-dqagui/blob/master/NEWS.md),\n[miRacumDQA](https://github.com/miracum/dqa-miracumdqa/blob/master/NEWS.md),\n[kdry](https://github.com/kapsner/kdry/blob/main/NEWS.md),\n[mlexperiments](https://github.com/kapsner/mlexperiments/blob/main/NEWS.md),\n[mllrnrs](https://github.com/kapsner/mllrnrs/blob/main/NEWS.md),\n[mlsurvlrnrs](https://github.com/kapsner/mlsurvlrnrs/blob/main/NEWS.md)\n[authors-block](https://github.com/kapsner/authors-block/blob/main/NEWS.md)\n\n**(If you are using `autonewsmd` and you like to have your repository\nlisted here, please add the link pointing to the changelog file to this\n[`README.md`](./README.md) and create a pull request.)**\n\n## Related R Packages\n\n- [`newsmd`](https://github.com/Dschaykib/newsmd): manually add updates\n  (version or bullet points) to the NEWS.md file\n- [`fledge`](https://github.com/cynkra/fledge): to streamline the\n  process of updating changelogs (NEWS.md) and versioning R packages\n  developed in git repositories (also supporting conventional commits)\n\n## TODOs:\n\n- add options to format the changelog\n- add more changelog style templates\n- add support for [Commit message with\n  scope](https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-scope)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapsner%2Fautonewsmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapsner%2Fautonewsmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapsner%2Fautonewsmd/lists"}