{"id":21346384,"url":"https://github.com/thehive-project/sbt-github-changelog","last_synced_at":"2025-03-16T03:43:23.312Z","repository":{"id":57740944,"uuid":"255083760","full_name":"TheHive-Project/sbt-github-changelog","owner":"TheHive-Project","description":"Generate change log from Github repository","archived":false,"fork":false,"pushed_at":"2021-08-30T15:33:09.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-18T18:45:44.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheHive-Project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-12T13:03:35.000Z","updated_at":"2021-08-30T15:33:12.000Z","dependencies_parsed_at":"2022-09-06T20:40:13.142Z","dependency_job_id":null,"html_url":"https://github.com/TheHive-Project/sbt-github-changelog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHive-Project%2Fsbt-github-changelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHive-Project%2Fsbt-github-changelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHive-Project%2Fsbt-github-changelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHive-Project%2Fsbt-github-changelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheHive-Project","download_url":"https://codeload.github.com/TheHive-Project/sbt-github-changelog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822277,"owners_count":20353499,"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":[],"created_at":"2024-11-22T02:08:26.365Z","updated_at":"2025-03-16T03:43:23.292Z","avatar_url":"https://github.com/TheHive-Project.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sbt-github-changelog\nsbt-github-changelog is a simple sbt plugins that generates a change log file from Github milestone content.\n\n[![Scaladex](https://index.scala-lang.org/thehive-project/sbt-github-changelog/sbt-github-changelog/latest.svg)](https://index.scala-lang.org/thehive-project/sbt-github-changelog/sbt-github-changelog/)\n\n## How to use\nThis plugin requires sbt 1.3+\n\nAdd the following line in your `project/plugins.sbt` file:\n```sbt\naddSbtPlugin(\"org.thehive-project\" % \"sbt-github-changelog\" % \"0.2.0\")\n```\n\nYou need to [generate a Github authentication token](https://github.com/settings/tokens/new?description=sbt-github-changelog) and store it in the file `~/.github/token`\n\nUnder a Github project repository, run the task `changeLog`\n\n## Configuration\nThe Github authentication token can be stored in sbt file (but don't commit it) using the setting `token`.\n\nBy default, sbt-github-changelog reads the authentication token from the file `tokenFile` (which is `$HOME/.github/token` by default).\n\nThe task `changeLog` generates the change log file in `changeLogFile` (`CHANGELOG.md` by default).\n\nThe plugin extracts the project name and owner from git remote configuration (`.git/config`). These values can be set using the setting `githubProject`:\n```sbt\ngithubProject := \"TheHive-Project\" -\u003e \"sbt-github-changelog\"\n```\n\nInside a milestone, issues are grouped according to its type. You can configure types by defining labels associated with:\n```sbt\nissueTypes := Seq(\n  \"Fixed bugs\" -\u003e Seq(\"bug\"),\n  \"Implemented enhancements\" -\u003e Seq(\"enhancement\", \"feature request\")\n)\n```\n\nIf no type is found, the `defaultIssueType` is used.\n\nThis plugin doesn't support pagination when it retrieves data from Github. This means that there is a maximum number of milestones (`maxMilestones`), and a maximum number of issues in milestone (`maxIssues`). Both are set to 100 by default.\n\nMilestone and issue can be filtered using `milestoneFilter` and `issueFilter`:\n```sbt\nmilestoneFilter := ((milestone: Milestone) =\u003e !milestone.title.contains(\"-RC\"))\nissueFilter     := ((issue: Issue)         =\u003e !issue.labels.contains(\"wontfix\"))\n``` \n## Custom rendering\n\nYou can customize renderring of issue, milestone and whole change log:\n```scala\nimport org.thp.ghcl._\n\nissueRenderer := ((issue: Issue) ⇒ s\"- ${issue.title} [\\\\#${issue.number}](${issue.url})\"),\nmilestoneRenderer := { (milestone: Milestone) ⇒\n  val date = DateTimeFormatter\n    .ISO_LOCAL_DATE\n    .format(milestone.date)\n  milestone\n    .issues\n    .groupBy(_.`type`(issueTypes.value))\n    .map {\n      case (t, issues) ⇒\n        s\"\"\"**${t.getOrElse(defaultIssueType.value)}:**\n           |\n           |${issues.map(issueRenderer.value.write).mkString(\"\\n\")}\"\"\".stripMargin\n    }\n    .mkString(\n      s\"## [${milestone.title}](${milestone.url}) ($date)\\n\\n\",\n      \"\\n\\n\",\n      \"\\n\"\n    )\n},\nchangeLogRenderer := { (milestones: Seq[Milestone]) ⇒\n  \"# Change Log\\n\\n\" + milestones\n    .map(milestoneRenderer.value.write)\n    .mkString(\"\\n\")\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehive-project%2Fsbt-github-changelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthehive-project%2Fsbt-github-changelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehive-project%2Fsbt-github-changelog/lists"}