Show appreciation for your team’s code with Bonusly for GitHub
Tags: actionshackathon, github, opensource
Published: 2020-09-18 02:50:19

---
title: Show appreciation for your team’s code with Bonusly for GitHub
published: true
description: A GitHub Actions x DEV Hackathon project.
tags: actionshackathon, github, opensource 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/2nke2zfiubr5xx6g84gj.png
---

Have you heard of [Bonusly](https://bonus.ly/)? If not, you’re missing out. It’s a tool “dedicated to building recognition-rich cultures in workplaces across the globe”. One of the core concepts of the tool is to award your teammates with “points”. This could be for a job well done, a birthday, a work anniversary, anything you can think of. These points can then be redeemed for physical and digital goods, gift cards, donations to charity, and more.

I’ve long been a fan, and thought there must be a way to combine Bonusly’s recognition point system with the hard work developers do. That’s why I’m happy to present my submission to the GitHub Actions x DEV Hackathon: [Bonusly for GitHub](https://github.com/marketplace/actions/bonusly-for-github).

### My Workflow

You can find and install the Bonusly for GitHub Action from the [GitHub Marketplace](https://github.com/marketplace/actions/bonusly-for-github).

Follow the README [Usage](https://github.com/marketplace/actions/bonusly-for-github#usage) instructions to get started, including prerequisites for secrets. An example workflow might look something like this:

```yaml
name: Bonusly

on:
  pull_request:
    types: [closed]

jobs:
  merge-allocate:
    runs-on: ubuntu-latest
    name: Merge allocate
    steps:
      - uses: actions/checkout@v2
      - uses: jodyheavener/bonusly-github@0.1.0
        if: github.event.pull_request.merged
        with:
          bonusly-token: ${{ secrets.BONUSLY_API_TOKEN }}
          github-token: ${{ secrets.GH_API_TOKEN }}
          default-hashtag: '#awesome'
```

You’ll notice that this runs only on Pull Request closure, and is further narrowed by the if statement under “steps” to indicate we only want to act on merged Pull Requests.

Once you’re up and running, all that’s left to do is to start awarding points to your co-workers via comments on their PRs! Check out the repo README for supported comment formats, as well as some gotchas that may occur.

![Example of a pull request with a Bonusly comment](https://dev-to-uploads.s3.amazonaws.com/i/98297bct7g6eha0lw6zm.png)

Once the Pull Request is merged the Action will run and allocate any Bonusly points to the commit authors of the PR. This even works for co-authored commits!

![Example of a merged pull request with Bonusly points awarded](https://dev-to-uploads.s3.amazonaws.com/i/yhp6yqh70a5xr7pwetoh.png)

Done! Points awarded and teammates celebrated for their hard work. 🥂

![Preview of Bonusly dashboard displaying awarded points](https://dev-to-uploads.s3.amazonaws.com/i/lybii3hbqoz2is1liy00.png)

### Submission Category: 

**Wacky Wildcards**

I might even say **Maintainer Must-Haves** as well, depending on how your team is set up.

### Yaml File or Link to Code

{% github https://github.com/jodyheavener/bonusly-github %}

### Additional Resources / Info

GitHub Actions are a lot of fun. I actually went through a [whole lot of ideas](https://twitter.com/jodyheavener/status/1295538512670990337) before landing on this one. It was totally worth it because Bonusly is a pretty powerful tool for bringing teams together, especially these days when a lot of folks might not be connecting with their teammates as much as they’d like.

Hope you liked this submission. All thoughts and feedback welcome.