derek - a GitHub 🤖 for managing your Open Source project
Clone or download
Latest commit 72e2da8 Oct 11, 2018
Permalink
Failed to load latest commit information.
.github Create PULL_REQUEST_TEMPLATE.md Apr 20, 2018
auth Split auth package for clients Aug 31, 2018
factory Split auth package for clients Aug 31, 2018
sample Support HMAC and signing of JWT Aug 14, 2017
types Add contributing URL field to .DEREK.yml Sep 10, 2018
vendor Split auth package for clients Aug 31, 2018
.CUSTOMERS Update .CUSTOMERS Feb 24, 2018
.DEREK.yml Update .DEREK.yml Dec 4, 2017
.dockerignore Fix faas-cli build May 17, 2018
.gitignore Add "derek-*-key" to gitignore & amend GET.md Apr 2, 2018
.travis.yml Extend .travis.yml to build with script and push image Aug 17, 2018
CONTRIBUTING.md Update CONTRIBUTING.md May 10, 2018
Dockerfile Update golang version build to 1.10.3 Jul 23, 2018
GET.md Show deploy command with stack file Jul 4, 2018
Gopkg.lock Split auth package for clients Aug 31, 2018
Gopkg.toml Split auth package for clients Aug 31, 2018
LICENSE Mention OpenFaaS Authors in license May 11, 2018
Makefile Refactoring and build fix Nov 24, 2017
README.md Update README.md Oct 11, 2018
USER_GUIDE.md Split USER_GUIDE examples into separate code blocks Aug 17, 2018
build.sh Extend .travis.yml to build with script and push image Aug 17, 2018
commentHandler.go Support slash as a command trigger Sep 25, 2018
commentHandler_test.go Support slash as a command trigger Sep 25, 2018
derek.yml Bump Docker image version Jul 3, 2018
main.go Add contributing URL field to .DEREK.yml Sep 10, 2018
main_test.go Add contributing URL field to .DEREK.yml Sep 10, 2018
permissionsHandler.go Add license notice Jun 23, 2018
permissionsHandler_test.go Add license notice Jun 23, 2018
pullRequestHandler.go Add contributing URL field to .DEREK.yml Sep 10, 2018
pullRequestHandler_test.go Transforming contributor function into a method Jul 6, 2018
sample_pull.json Add customer support Nov 13, 2017
secrets.example.yml Add customer support Nov 13, 2017
stack.example.yml Update key paths for OpenFaaS 0.8.3 Jul 3, 2018

README.md

derek

Build Status OpenFaaS License: MIT

It's derek . Nice to meet you. I'd like to help you with Pull Requests and Issues on your GitHub project.

Please show support for the project and Star the repo.

From the team that bought you OpenFaaS - Serverless Functions Made Simple.

Looking for the User Guide?

Existing users of Derek can read the user-guide here.

Our users

Some of our users include:

  • Docker / Moby:

https://github.com/moby/moby/issues/35736

  • OpenFaaS

https://github.com/openfaas/faas-cli/issues/85

Example: https://github.com/Subsurface-divelog/subsurface/pull/1748

What can I do?

  • Check that commits are signed-off

When someone sends a PR without a sign-off, I'll apply a label no-dco and also send them a comment pointing them to the contributor guide. Most of the time when I've been helping the OpenFaaS project - people read my message and fix things up without you having to get involved.

  • Allow users in a specified .DEREK.yml file to manage issues and pull-requests

You don't have to give people full write access anymore to help you manage issues and pull-requests. I'll do that for you, just put them in a .DEREK.yml file in the root and when they comment on an issue then I'll use my granular permissions instead.

  • Wait.. doesn't the term "maintainer" mean write access in GitHub?

No this is what Derek sets out to resolve. The users in your maintainers list have granular permissions which you'll see in detail when you add the app to your repo org.

maintainers:
- alexellis
- rgee0

You can use the alias "curators" instead for the exact same behaviour:

curators:
- alexellis
- rgee0
  • What about roles?

We are planning to add roles in the ROADMAP which will mean you can get even more granular and have folks who can only add labels but not close issues for instance. If you feel you need to make that distinction. It will also let you call the roles whatever you think makes sense.

Note that the assign/unassign commands provides the shortcut me to assign to the commenter

  • URL redirection of configuration files is supported via the "redirect" field:
redirect: https://github.com/<some-user>/<some-repo>/.DEREK.yaml

If this optional field is non-empty, Derek will read it's configuration from another location. This allows multiple projects to use the same configuration. Please note that redirection is only supported for GitHub repository URLs.

  • Command triggers

By default, Derek commands can be called with Derek <some-command>. The prefix Derek is the default trigger, but the bot also supports the / trigger which can be enabled by setting the use_slash_trigger environment variable to true.

Examples:

  • Update the title of a PR or issue

Let's say a user raised an issue with the title I can't get it to work on my computer

Derek set title: Question - does this work on Windows 10?

or

Derek edit title: Question - does this work on Windows 10?
  • Triage and organise work through labels

Labels can be used to triage work or help sort it.

Derek add label: proposal
Derek add label: help wanted
Derek remove label: bug
  • Set milestones for issues

You can organize your issues in groups through existing milestones

Derek set milestone: example
Derek remove milestone: example
  • Assign work

You can assign work to people too

Derek assign: alexellis
Derek unassign: me
  • Open and close issues and PRs

Sometimes you may want to close or re-open issues or Pull Requests:

Derek close
Derek reopen
  • Lock/un-lock conversation/threads

This is useful for when conversations are going off topic or an old thread receives a lot of comments that are better placed in a new issue.

Derek lock
Derek unlock

Backlog:

  • Derek as a managed GitHub App
  • Lock thread
  • Edit title
  • Toggle the DCO-feature

Future work:

  • Caching of customers / .DEREK.yml file
  • Observability of GitHub API Token rate limit
  • Add roles & actions
  • Branch Checking

Live demo here

How do I work?

I'm designed to be installed as a GitHub App, but don't worry - I don't need a lot of permissions. Just access to issues and Pull Requests will do.

I'm not a long-running daemon.. I'd get bored that way. I work with webhooks - so stick me in a serverless framework like OpenFaaS and forget about me. Just apply oil from time to time.

This is me in action! Normally contributors edit and re-push within a few minutes after re-reading the contribution guide.

Inspiration for Derek

The idea for a bot that could comment on issues or respond to activity is from the docker/docker or Moby project's bot called Poule. It's a much more complex long-running daemon which uses Personal Access Tokens (so needs to run as a full GitHub login). Derek is much simpler (so hackable) and can be installed with granular permissions.

Where is Derek working now?

Derek is active and operating 24/7 helping the award-winning OpenFaaS project!

Maintainers / contributors

  • Alex Ellis - author
  • Richard Gee (@rgee0) - co-maintainer
  • John Mccabe (@johnmccabe) - contributor

Alex Ellis created Derek to automate project maintainer duties around licensing and to help bring granular permissions back to GitHub. Derek has empowered contributors in the OpenFaaS community to run and maintain the project without needing full write access. OpenFaaS contributors continue to improve Derek so they can get the job done without fuss.

Contributions

Please follow the OpenFaaS contribution guide.

Get your own Derek robot

To use our managed service (recommended) get in touch with Alex Ellis for more info. Once you have installed the GitHub App you will need to send a PR to the customers file with your username or organisation. The final step is to add your .DEREK.yml - you can use the file from this repository as an example.

You can host and manage your own Derek robot using these instuctions, or use our managed service.