All Projects → dlang → dlang-bot

dlang / dlang-bot

Licence: MIT license
dlang-bot for automated bugzilla, github, and trello references

Programming Languages

d
599 projects

Projects that are alternatives of or similar to dlang-bot

travis-activate
Activates Travis-CI builds for all repos in a given GitHub project
Stars: ✭ 20 (+0%)
Mutual labels:  github-api, travis-ci
geet
Command line interface for performing Git hosting service operations
Stars: ✭ 14 (-30%)
Mutual labels:  github-api, prs
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (+1215%)
Mutual labels:  trello, travis-ci
Awesome Github
A curated list of awesome GitHub guides, articles, sites, tools, projects and resources. 收集这个列表,只是为了更好地使用GitHub,欢迎提交pr和issue。
Stars: ✭ 1,962 (+9710%)
Mutual labels:  github-api, travis-ci
react-graphql-github-vanilla
A React GraphQL example using GitHub's GraphQL API with vanilla JS
Stars: ✭ 69 (+245%)
Mutual labels:  github-api
rails-rest-api
A simple RoR 5 REST API demo with JWT authentication.
Stars: ✭ 25 (+25%)
Mutual labels:  travis-ci
github-profile-views-counter
🚀 Set up this GitHub profile views counter for your profile that does not require any services to record profile views
Stars: ✭ 66 (+230%)
Mutual labels:  github-api
rabbitChat
A Chat-Server/Chat-System based on AMQP protocol(RabbitMQ) + AMQP Python Client(PIKA) + Websockets(SockJS) + Async Python Server(Tornado)
Stars: ✭ 53 (+165%)
Mutual labels:  travis-ci
git-issues
A better way to browse GitHub issues.
Stars: ✭ 25 (+25%)
Mutual labels:  github-api
trello-postman-collection
A Postman collection for Trello REST API
Stars: ✭ 20 (+0%)
Mutual labels:  trello
spotify-playing-readme
A really easy way to display your spotify listening status on READMEs and Website.
Stars: ✭ 21 (+5%)
Mutual labels:  github-api
scikit-ci
Simpler and centralized CI configuration for Python extensions.
Stars: ✭ 15 (-25%)
Mutual labels:  travis-ci
RxSwift-MVVM-iOS
SwiftMVVM is an sample iOS App written in Swift using the MVVM architecture.
Stars: ✭ 96 (+380%)
Mutual labels:  github-api
watchub
Be notified of people who followed/unfollowed you and starred/unstarred your repositories
Stars: ✭ 55 (+175%)
Mutual labels:  github-api
travis-ci-latex-pdf
Overview of different methods to build LaTeX with GitHub Actions or Travis-CI (idea by @jackolney but completely rewritten by @PHPirates and contributors).
Stars: ✭ 113 (+465%)
Mutual labels:  travis-ci
github-watchman
Monitoring GitHub for sensitive data shared publicly
Stars: ✭ 60 (+200%)
Mutual labels:  github-api
gityeller
Stay in the loop of your favorite Github repositories.
Stars: ✭ 18 (-10%)
Mutual labels:  github-api
bug2trello
A Chrome extension to add bugs/issues to a Trello board
Stars: ✭ 21 (+5%)
Mutual labels:  trello
HaxeCI
An example of using CI for Haxe projects.
Stars: ✭ 45 (+125%)
Mutual labels:  travis-ci
useful-forks.github.io
Improving GitHub's Forks list discoverability through automatic filtering. The project offers an online tool and a Chrome extension.
Stars: ✭ 917 (+4485%)
Mutual labels:  github-api

Dlang-Bot

Codecov

dlang-bot

Features

Automated references

For example let's say you fixed Issue 16582 and make a PR for on GitHub. If one of your commits mentions the issue, e.g. like this Git commit message:

fix Issue 16582 - ParameterDefaults fails w/ scope parameter

The Dlang-Bot will do all the hard work of linking and referencing between Bugzilla, GitHub and Trello do for you.

GitHub

It would comment on GitHub with list of all mentioned issues and link them to Bugzilla:

dlang-bot-github

The first column of the table is the current status of the referenced issue. A means that the issue is only mentioned (i.e. the commit message doesn't contain "Fix") and the Bugzilla issue won't be auto-closed nor listed in the changelog as fixed:

image

Trello

For the Trello board it will also provide a reference:

dlang-bot-trello

And once a PR gets merged, the bot moves the linked Trello card to "Testing / Review".

Bugzilla

Once a PR has been merged (i.e. the commits got pushed to master or stable), GitHub's Bugzilla integration will automatically comment to Bugzilla with a regarding commit:

dlang-bot-bugzilla

It will also automatically close the referenced issues if fix or fixes (case-insensitive) appears before the issue reference.

Using this syntax is also very important because for the changelog generation, the git history will be used. Thus only if the Dlang-Bot has detected an issue and commented on your PR it can become part of the changelog.

In doubt, you can use e.g. Regex101 to validate your commit message.

Referencing multiple issues

It's possible to reference multiple issues, e.g. with "Fixes issues 17494, 17505, 17506" the Dlang-Bot would detect:

image

Accepted optional separators are: commas (,), the word and, as well as the plus sign (+), and any amount of whitespace. Dlang-Bot will aggregate all mentioned issues over multiple commits.

Nerdy details

  • one can mention multiple issues in one commit and/or multiple commits
  • the exact RegEx is:
(?:^fix(?:es)?(?:\s+(?:issues?|bugs?))?\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))|(?:(?:issues?|bugs?)\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))

(the GitHub Bugzilla integration and the Dlang-Bot use the same RegEx to parse git commit messages)

Auto-merge (WIP)

At the moment the Dlang-Bot supports merging via special auto-merge and auto-merge-squash labels. The later will perform a squashed merge of all commits in the PR into a single one.

A reviewer can toggle a PR for "auto-merge" by simply adding the auto-merge label (auto-merge-squash respectively).

Nerdy details

  • this relies on the "restricted branches" feature of GitHub (the Dlang-Bot will send the attempt to merge to the GitHub API)
  • once a new commit event occurs (push, synchronization) the Dlang-Bot will automatically remove set all auto-merge labels from the PR
  • for status events the GitHub API doesn't allow to get an information about the
  • the Dlang-Bot will then try to restart the PR on every new event.
  • concerning PR of the commit (thus all potential auto-merge PRs are checked)

Note: at the moment the Dlang-Bot doesn't store any authentication token, so it can't perform actions on behalf of others.

Warn about common mistakes

The Dlang-Bot will try to detect common mistakes and warn the contributor. Currently implemented:

  • Regression fixes doesn't target stable

image

Find stalled PRs

The Dlang-Bot goes over all pull requests every day and will label PRs:

Currently this feature is in alpha-mode and only enabled for Phobos.

Allow PR submitters to label their PRs

Dlang-Bot detects a pre-defined set of labels in the [] part of PR title and will label the PRs accordingly. Multiple labels are supported.

image

image

Currently the hard-coded set of detected labels is:

  • WIP
  • trivial

Send contributing advice message

For all repos in the dlang organization Dlang-Bot provides contributing advice on a new PR:

image

Auto-label PRs

If a PR contains Bugzilla references, the Dlang-Bot will automatically add a respective label:

image

Of course, other issue types can be detected as well:

image

Using the Dlang-Bot for your project

@dlang-bot responds to GitHub events sent to its webhook. To use the bot in your project, configure a webhook with the following settings:

  • Payload URL: https://bot.dlang.io/github_hook (or your own instance)
  • Content type: application/json
  • Select at least these events (or all):
    • Label
    • Pull request
    • Pull request review
    • Pull request comment
    • Status

For auto-merge:

  • a respective label needs to be added (at the dlang repositories #d3d3d3 is used as a label color)
  • @dlang-bot (or your own bot) needs to have write access to the GitHub repo (GitHub's protected branches are ideal for this)

For example, dlang/phobos is configured as follows:

image

Improve the bot

Run the testsuite:

dub test -- --single --debug --trace

Missing a feature?

Is 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].