DEV Community

Cover image for The Good Place - A GitHub Action 🍀
Jaye Hernandez
Jaye Hernandez

Posted on β€’ Edited on

The Good Place - A GitHub Action 🍀

My Workflow

The Good Place may have ended, but you can be an architect of your own neighborhood (your repository) with The Good Place action! This GitHub Action:

  • Replaces curse words in Issues and Pull Requests with approved words in The Good Place

Feature 1

  • Comments a forking accurate GIF when you first label an issue (supports GitHub's default labels)

Feature 2

Submission Category

I absolutely LOVE this show! I can't get the idea out of my head so here it is. This is an entry for Wacky Wildcards. 🍀

Yaml File or Link to Code

More info about the action can be found here:

GitHub logo jayehernandez / the-good-place

A GitHub Action that lets you be an architect of your own neighborhood (your repository) in The Good Place

Hero Image

Documentation License: MIT Twitter: jayehernandez_

A GitHub Action that lets you be an architect of your own neighborhood (your repository) in The Good Place

🍀 Features

  • Replaces curse words in Issues and Pull Requests with approved words in The Good Place

Feature 1 Demo

  • Comments a forking accurate GIF when you first label an issue (supports GitHub's default labels)

Feature 2 Demo

🧐 How to Use

Create a new file titled action.yml inside the .github/workflows directory of your repository and copy the code below.

on:
  issues:
    types: [opened, edited, labeled]
  issue_comment:
    types: [created, edited]
  pull_request:
    types: [opened, edited]
  pull_request_review_comment:
    types: [created, edited]
jobs:
  build:
    runs-on: ubuntu-latest
    name: The Good Place
    steps:
      - name: The Good Place Action
        uses: jayehernandez/the-good-place@v1.1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

πŸ™πŸ» Acknowledgements

Give a ⭐️ if you think this project is cool!

…




Or, you can create a new file titled action.yml inside the .github/workflows directory of your repository and copy the code below.

on:
  issues:
    types: [opened, edited, labeled]
  issue_comment:
    types: [created, edited]
  pull_request:
    types: [opened, edited]
  pull_request_review_comment:
    types: [created, edited]
jobs:
  build:
    runs-on: ubuntu-latest
    name: The Good Place
    steps:
      - name: The Good Place Action
        uses: jayehernandez/the-good-place@v1.1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

v1.1 introduces a fix for the Scunthorpe problem as flagged in this comment!

Additional Resources / Info

The action was created using JavaScript and the Octokit API. The documentation provided for Octokit was easy to understand for beginners like me. GIFs used were from GIPHY.

Huge thank you as well to the JavaScript Actions course of the GitHub Training Team which taught me the basic concepts I needed to learn. I highly suggest that you check that out if you'd like to create your own.


Are you a fan of The Good Place? Let me know what you think about this action!

The Good Place GIF

Top comments (24)

Collapse
Β 
moopet profile image
Ben Sinclair β€’

I haven't run it, but will this run a cropper with the Scunthorpe problem?

Without word boundaries in the regular expression, it'll cause strife with Cockney Rhyming Slang generators.

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Only knew about this problem as you raised it! I’ll be testing it out to see.

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Just deployed a fix for the Scunthorpe problem. I've changed the regular expression to account for word boundaries.

Now words like classic won't turn into clashic (since ass -> ash). Thanks for bringing this up!

Thread Thread
Β 
moopet profile image
Ben Sinclair β€’

"Clashic" - Sean Connery.

Collapse
Β 
almenon profile image
Almenon β€’

Darnit there goes any hope of me winning the hackathon πŸ˜‚ great job!

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Submit an entry too!! πŸ‘ŒπŸ»

Collapse
Β 
ashishk1331 profile image
Ashish Khare😎 β€’

No, my fave Brooklyn Nine-Nine.
And this is not how we do in nine nine!

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Another GREAT show! NINE NINE!

Collapse
Β 
ashishk1331 profile image
Ashish Khare😎 β€’

NINE NINE!

Collapse
Β 
dianait profile image
Diana HernΓ‘ndez β€’

I love the Good Place and love this! It’s fantastic πŸ‘Œ! I want to get into gitHub Actions amd do something similar. It’s seem awesome! 😊

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

It is awesome to learn about! Would love to see what you come up with 😊

Collapse
Β 
raphael_jambalos profile image
Raphael Jambalos β€’

Great Github Actions, Jaye! I think this is a great way to keep tech communities a "good place".

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

What a great way to put it, thank you Jamby!! 😊

Collapse
Β 
tracycss profile image
Jane Tracy πŸ‘©πŸ½β€πŸ’» β€’

This is amazing Jaye :)

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Thanks Jane! :)

Collapse
Β 
vaibhavkhulbe profile image
Vaibhav Khulbe β€’

Woohoo, really nice use of Actions! 😎

Good luck with the hackathon! ☺

Collapse
Β 
jayehernandez profile image
Jaye Hernandez β€’

Thank you Vaibhav!! πŸ™ŒπŸ»

Collapse
Β 
marta83 profile image
Marta83 β€’

I love it! great idea πŸ‘πŸ»πŸ‘πŸ»πŸ‘πŸ»

Collapse
Β 
bogdaaamn profile image
Bogdan Covrig β€’

ahahhaha that is amazing, absolutely loved it

high five ish

Collapse
Β 
moopet profile image
Ben Sinclair β€’

This action is the shirt.