{"id":21480323,"url":"https://github.com/dlang/dlang-bot","last_synced_at":"2025-07-15T12:31:53.366Z","repository":{"id":42123360,"uuid":"45722871","full_name":"dlang/dlang-bot","owner":"dlang","description":"dlang-bot for automated bugzilla, github, and trello references","archived":false,"fork":false,"pushed_at":"2024-01-16T09:56:16.000Z","size":1007,"stargazers_count":22,"open_issues_count":34,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-10T00:02:13.235Z","etag":null,"topics":["auto-merge","automation","bugzilla","dlang-bot","github","github-api","prs","travis-ci","trello"],"latest_commit_sha":null,"homepage":"https://bot.dlang.io/","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"open_collective":"dlang","custom":"https://dlang.org/foundation/donate.html"}},"created_at":"2015-11-07T04:44:33.000Z","updated_at":"2023-12-05T14:57:27.000Z","dependencies_parsed_at":"2024-01-16T11:47:53.084Z","dependency_job_id":null,"html_url":"https://github.com/dlang/dlang-bot","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/dlang%2Fdlang-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang%2Fdlang-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang%2Fdlang-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang%2Fdlang-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlang","download_url":"https://codeload.github.com/dlang/dlang-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226038788,"owners_count":17564046,"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":["auto-merge","automation","bugzilla","dlang-bot","github","github-api","prs","travis-ci","trello"],"created_at":"2024-11-23T12:14:33.873Z","updated_at":"2024-11-23T12:14:34.394Z","avatar_url":"https://github.com/dlang.png","language":"D","readme":"# Dlang-Bot\n\n[![Codecov](https://img.shields.io/codecov/c/github/dlang/dlang-bot/master.svg)](https://codecov.io/gh/dlang/dlang-bot)\n\n\u003cimg alt=\"dlang-bot\" height=\"200px\" src=\"public/img/dlang_bot.png\" /\u003e\n\nFeatures\n--------\n\n- [Automated bugzilla, github, and trello references](#automated-references)\n- [Auto-merging approved \u0026 passing PRs](#auto-merge)\n- [Warn about common mistakes](#warn-common-mistakes)\n- [Find stalled PRs](#stalled-prs)\n- [Allow PR submitters to label their PRs](#user-tagging)\n- [Send contributing advice message](#hello-contributor)\n- [Auto-label PRs](#auto-labelling)\n- [Using the Dlang-Bot for your project](#dlang-bot-for-your-project)\n- [Missing a feature?](#missing-a-feature)\n\n\u003ca name=\"automated-references\" /\u003e\n\nAutomated references\n--------------------\n\nFor example let's say you fixed [Bugzilla Issue 16582](https://issues.dlang.org/show_bug.cgi?id=16582)\nand make a PR for on GitHub.\nIf one of your commits mentions the issue, e.g. like this Git commit message:\n\n```\nfix Bugzilla Issue 16582 - ParameterDefaults fails w/ scope parameter\n```\n\nThe Dlang-Bot will do all the hard work of linking and referencing\nbetween Bugzilla, GitHub and Trello do for you.\n\n### GitHub\n\nIt would comment on GitHub with list of all mentioned issues and link them to Bugzilla:\n\n\u003cimg alt=\"dlang-bot-github\" height=\"120px\" src=\"public/img/dlang_bot_github_comment.png\" /\u003e\n\nThe first column of the table is the current status of the referenced issue.\nA `✗` means that the issue is only mentioned (i.e. the commit message doesn't contain \"Fix\")\nand the Bugzilla issue won't be auto-closed nor listed in the changelog as fixed:\n\n![image](https://user-images.githubusercontent.com/4370550/27858949-7e9dd862-6177-11e7-9ba2-764c919f7a78.png)\n\n### Trello\n\nFor the [Trello board](https://trello.com/b/XoFjxiqG/active) it will also provide a\nreference:\n\n\u003cimg alt=\"dlang-bot-trello\" height=\"120px\" src=\"public/img/dlang_bot_trello_comment.png\" /\u003e\n\nAnd once a PR gets merged, the bot moves the linked Trello card to \"Testing / Review\".\n\n### Bugzilla\n\nOnce a PR has been merged (i.e. the commits got pushed to master or stable),\nGitHub's Bugzilla integration will automatically comment to Bugzilla with a regarding commit:\n\n\u003cimg alt=\"dlang-bot-bugzilla\" height=\"120px\" src=\"public/img/dlang_bot_bugzilla_comment.png\" /\u003e\n\nIt will also automatically close the referenced issues if `fix` or `fixes` (case-insensitive)\nappears before the issue reference.\n\nUsing this syntax is also very important because for the changelog generation, the\ngit history will be used. Thus _only_ if the Dlang-Bot has detected an issue\nand commented on your PR it can become part of the changelog.\n\nIn doubt, you can use e.g. [Regex101](https://regex101.com/r/vjOAM4/1) to validate your commit message.\n\n### Referencing multiple issues\n\nIt's possible to reference multiple issues, e.g. with \"Fixes issues 17494, 17505, 17506\" the Dlang-Bot would detect:\n\n![image](https://user-images.githubusercontent.com/4370550/27887078-2322e06e-61df-11e7-85cd-4cd5648e0139.png)\n\nAccepted optional separators are: commas (`,`), the word `and`, as well as the plus sign (`+`),\nand any amount of whitespace. Dlang-Bot will aggregate all mentioned issues over multiple commits.\n\n### Nerdy details\n\n- one can mention multiple issues in one commit and/or multiple commits\n- the exact RegEx is:\n\n```\n(?:^fix(?:es)?(?:\\s+(?:issues?|bugs?))?\\s+(#?\\d+(?:[\\s,\\+\u0026and]+#?\\d+)*))|(?:(?:issues?|bugs?)\\s+(#?\\d+(?:[\\s,\\+\u0026and]+#?\\d+)*))\n```\n\n(the GitHub Bugzilla integration and the Dlang-Bot use the same RegEx to parse\ngit commit messages)\n\n\u003ca name=\"auto-merge\" /\u003e\n\nAuto-merge (WIP)\n---------------\n\nAt the moment the Dlang-Bot supports merging via special `auto-merge` and\n`auto-merge-squash` labels. The later will perform a squashed merge of all commits\nin the PR into a single one.\n\nA reviewer can toggle a PR for \"auto-merge\" by simply adding the `auto-merge` label\n(`auto-merge-squash` respectively).\n\n\n### Nerdy details\n\n- this relies on the \"restricted branches\" feature of GitHub (the Dlang-Bot will\nsend the attempt to merge to the GitHub API)\n- once a new commit event occurs (push, synchronization) the Dlang-Bot will\nautomatically remove set all auto-merge labels from the PR\n- for status events the GitHub API doesn't allow to get an information about the\n- the Dlang-Bot will then try to restart the PR on every new event.\n- concerning PR of the commit (thus all potential auto-merge PRs are checked)\n\n_Note_: at the moment the Dlang-Bot doesn't store _any_ authentication token, so\nit can't perform actions on behalf of others.\n\n\u003ca name=\"warn-common-mistakes\" /\u003e\n\nWarn about common mistakes\n--------------------------\n\nThe Dlang-Bot will try to detect common mistakes and warn the contributor.\nCurrently implemented:\n- Regression fixes doesn't target `stable`\n\n![image](https://user-images.githubusercontent.com/4370550/27756953-604dfb36-5dfc-11e7-9d15-6ed8f747dada.png)\n\n\u003ca name=\"stalled-prs\" /\u003e\n\nFind stalled PRs\n----------------\n\nThe Dlang-Bot goes over all pull requests every day and will label PRs:\n\n- [\"stalled\"](https://github.com/dlang/phobos/issues?q=is%3Aopen+is%3Apr+label%3Astalled) (PR has had no activity within 60 days)\n- [\"needs rebase\"](https://github.com/dlang/phobos/issues?q=is%3Aopen+is%3Apr+label%3A%22needs+rebase%22) (PR has a merge conflict)\n- [\"needs work\"](https://github.com/dlang/phobos/issues?q=is%3Aopen+is%3Apr+label%3A%22needs+work%22) (PR has more than two failing CI providers)\n\nCurrently this feature is in alpha-mode and only enabled for Phobos.\n\n\u003ca name=\"user-tagging\" /\u003e\n\nAllow PR submitters to label their PRs\n---------------------------------------\n\nDlang-Bot detects a pre-defined set of labels in the `[]` part of PR title and will label the PRs accordingly.\nMultiple labels are supported.\n\n![image](https://user-images.githubusercontent.com/4370550/27757037-4d116368-5dfd-11e7-8df4-1446473f9d01.png)\n\n![image](https://user-images.githubusercontent.com/4370550/27757033-3ea63a7e-5dfd-11e7-95ab-c0f36521dc63.png)\n\nCurrently the hard-coded set of detected labels is:\n- WIP\n- trivial\n\n\u003ca name=\"hello-contributor\" /\u003e\n\nSend contributing advice message\n---------------------------------\n\nFor all repos in the `dlang` organization Dlang-Bot provides contributing advice on a new PR:\n\n![image](https://user-images.githubusercontent.com/4370550/27757092-c237063e-5dfd-11e7-8aab-7e655aea3ac8.png)\n\n\u003ca name=\"auto-labelling\" /\u003e\n\nAuto-label PRs\n---------------\n\nIf a PR contains [Bugzilla references](#automated-references), the Dlang-Bot will automatically add a respective label:\n\n![image](https://user-images.githubusercontent.com/4370550/27757121-1aa8a6f6-5dfe-11e7-97ad-240756f0c608.png)\n\nOf course, other issue types can be detected as well:\n\n![image](https://user-images.githubusercontent.com/4370550/27757177-bb944cdc-5dfe-11e7-8c40-26a7eb536700.png)\n\n\u003ca name=\"#dlang-bot-for-your-project\" /\u003e\n\nUsing the Dlang-Bot for your project\n------------------------------------\n\n@dlang-bot responds to GitHub events sent to its webhook.\nTo use the bot in your project, configure a webhook with the following settings:\n\n- Payload URL: `https://bot.dlang.io/github_hook` (or your own instance)\n- Content type: `application/json`\n- Select at least these events (or all): \n  - Label\n  - Pull request\n  - Pull request review\n  - Pull request comment\n  - Status\n\nFor `auto-merge`:\n- a respective label needs to be added (at the `dlang` repositories `#d3d3d3` is used as a label color)\n- `@dlang-bot` (or your own bot) needs to have write access to the GitHub repo (GitHub's protected branches are ideal for this)\n\nFor example, `dlang/phobos` is configured as follows:\n\n![image](https://user-images.githubusercontent.com/4370550/27859920-b418a38e-617a-11e7-9ff2-c1fd9f6fdd20.png)\n\n\u003ca name=\"missing-a-feature\" /\u003e\n\nImprove the bot\n---------------\n\nRun the testsuite:\n\n```\ndub test -- --single --debug --trace --debug\n```\n\nMissing a feature?\n------------------\n\nIs there a feature that you would love the Dlang-Bot to do? Then don't hesistate to let us know and [open a new issue](https://github.com/dlang/dlang-bot/issues/new).\n","funding_links":["https://opencollective.com/dlang","https://dlang.org/foundation/donate.html"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlang%2Fdlang-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlang%2Fdlang-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlang%2Fdlang-bot/lists"}