{"id":14067666,"url":"https://github.com/ThinkR-open/gitdown","last_synced_at":"2025-07-30T02:31:06.982Z","repository":{"id":43358530,"uuid":"211300536","full_name":"ThinkR-open/gitdown","owner":"ThinkR-open","description":"Document each modification of your software by turning your git commits into a gitbook","archived":false,"fork":false,"pushed_at":"2025-07-16T01:40:18.000Z","size":9471,"stargazers_count":35,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-17T03:08:07.676Z","etag":null,"topics":["bookdown","git","gitbook"],"latest_commit_sha":null,"homepage":"https://thinkr-open.github.io/gitdown","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2019-09-27T11:04:28.000Z","updated_at":"2025-05-28T14:07:16.000Z","dependencies_parsed_at":"2024-05-01T02:27:03.522Z","dependency_job_id":"a840428b-39ee-45fa-bb05-2d7d70e67e6a","html_url":"https://github.com/ThinkR-open/gitdown","commit_stats":{"total_commits":59,"total_committers":6,"mean_commits":9.833333333333334,"dds":0.6101694915254237,"last_synced_commit":"ffb46168981d5b0f507377222ce394ede02df59d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ThinkR-open/gitdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgitdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgitdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgitdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgitdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/gitdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgitdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267798625,"owners_count":24145727,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bookdown","git","gitbook"],"created_at":"2024-08-13T07:05:42.973Z","updated_at":"2025-07-30T02:31:06.682Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n# Copy reference/images to man/images\n# reference folder is required to work with pkgdown\nif (!dir.exists(\"man/figures\")) {dir.create(\"man/figures\")}\nfile.copy(list.files(\"reference/figures\", full.names = TRUE),\n          \"man/figures\", overwrite = TRUE)\n# if (dir.exists(\"docs\")) {\n#   file.copy(\"reference/figures/thinkr-hex-remedy-favicon.ico\",\n#             \"docs/favicon.ico\", overwrite = TRUE)\n# }\n```\n# gitdown \u003cimg src=\"man/figures/logo.png\" align=\"right\" alt=\"\" width=\"120\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/ThinkR-open/gitdown/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ThinkR-open/gitdown/actions/workflows/R-CMD-check.yaml)\n[![Coverage status](https://codecov.io/gh/ThinkR-open/gitdown/branch/main/graph/badge.svg)](https://codecov.io/github/ThinkR-open/gitdown?branch=main)\n[![CRAN status](https://www.r-pkg.org/badges/version/gitdown)](https://CRAN.R-project.org/package=gitdown)\n\u003c!-- badges: end --\u003e\n\nThe goal of {gitdown} is to build a bookdown report of commit messages arranged according to a pattern. Book can be organized according to git tags, issues mentioned (*e.g.* `#123`) or any custom character chain included in your git commit messages (*e.g.* `category_` for use like `category_ui`, `category_doc`, ...).\n\nFull documentation on {pkgdown} site : https://thinkr-open.github.io/gitdown/index.html  \n\n## Installation\n\nYou can install the stable version of {gitdown} from CRAN:\n\n```r\ninstall.packages(\"gitdown\")\n```\n\n\nYou can install the last version of {gitdown} from GitHub:\n\n``` r\nremotes::install_github(\"ThinkR-open/gitdown\")\n```\n\n## Create a reproducible example of a versioned directory\n\nCreate a versioned directory with some commits and a NEWS.md in a temporary directory\n\n- Some commits mention an issue with `#`\n- Some commits mention a ticket with `ticket`\n- A commit is associated with a tag\n\n```{r example, message=FALSE}\nlibrary(dplyr)\nlibrary(gitdown)\n## Create fake repository for the example\nrepo \u003c- fake_repo()\n```\n\n## Create a gitbook of commits sorted by a pattern\n\nThe main function of {gitdown} is to build this gitbook with all commit messages ordered according to a pattern. Each commit message associated with an issue will be recorded in the section of this issue. A commit message can thus appears multiple times if it is associated with multiple issues.  \nIf you have your own referencing system for tickets in an external software, you can also create the gitbook associated like using `ticket` as in the example below.\n\n```{r, eval=FALSE}\ngit_down(repo, pattern = c(\"Tickets\" = \"ticket[[:digit:]]+\",\n                           \"Issues\" = \"#[[:digit:]]+\"))\n```\n\n```{r, echo=FALSE, out.width=\"90%\", fig.align=\"center\"}\nknitr::include_graphics(\"reference/figures/gitdown_links.png\")\n```\n\nIf you add a table of correspondence, you can change titles of the patterns.  \n_Note that you can use [{gitlabr}](https://statnmap.github.io/gitlabr/) or [{gh}](https://gh.r-lib.org) to retrieve list of issues from GitLab or GitHub respectively, as presented in [\"Download GitLab or GitHub issues and make a summary report of your commits\"](https://rtask.thinkr.fr/download-gitlab-or-github-issues-and-make-a-summary-report-of-your-commits/)._  \n\n```{r, eval=FALSE}\n# With table of correspondence\npattern.table \u003c- data.frame(\n  number = c(\"#2\", \"#1\", \"#1000\"),\n  title = c(\"#2 A second issue to illustrate a blog post\",\n            \"#1 An example of issue\",\n            \"#1000 issue with no commit\"))\ngit_down(\n  pattern = c(\"Issue\" = \"#[[:digit:]]+\"),\n  pattern.table = pattern.table\n)\n```\n_Note that characters like `[`, `]`, `_` or `*` will be replaced by `-` in the titles to avoid conflicts with markdown syntax._\n\n\n```{r, echo=FALSE, out.width=\"90%\", fig.align=\"center\"}\nknitr::include_graphics(\"reference/figures/issues-with-title.png\")\n```\n\n## Read list of commits and extract information\n\nAs a side effect of {gitdown}, you can get some intermediate information used to build the book with some exported functions.\n\nGet commits with issues mentioned. The searched pattern is a `#` followed by at least one number: `\"#[[:digit:]]+\"`. Variable `pattern.content` lists patterns found in the commit messages. \n\n```{r}\nget_commits_pattern(repo, pattern = \"#[[:digit:]]+\", ref = \"main\") %\u003e% \n  select(pattern.content, everything())\n```\n\nGet commits with issues and specific home-made pattern. Use a named vector to properly separate types of patterns.\n\n```{r}\nget_commits_pattern(\n  repo, \n  pattern =  c(\"Tickets\" = \"ticket[[:digit:]]+\", \"Issues\" = \"#[[:digit:]]+\"),\n  ref = \"main\"\n) %\u003e% \n  select(pattern.type, pattern.content, everything())\n```\n\n\n## Create a vignette that lists all files with date of modification\n\n```{r, eval=FALSE}\nrepo_pkg \u003c- fake_repo(as.package = TRUE)\n# List only files in R/ directory\ncreate_vignette_last_modif(repo_pkg)\n# List all files of the git repository\ncreate_vignette_last_modif(repo_pkg, path = \"\")\n```\n\nWith this example, the vignette will show this content:  \n\n```{r, echo=FALSE, results='asis'}\nrepo_pkg \u003c- fake_repo(as.package = TRUE)\ncat(present_files(repo_pkg, path = \"\"))\n```\n\n## Sponsor\n\nThe development of this package has been sponsored by: \n\n\u003ca href = \"https://www.servier.fr/\"\u003e\u003cimg src = \"man/figures/servier.png\"\u003e\u003c/img\u003e\u003c/a\u003e\n  \n## Code of Conduct\n  \nPlease note that the {gitdown} project is released with a\n[Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fgitdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThinkR-open%2Fgitdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fgitdown/lists"}