🔥Let’s Do DevOps: GitHub Action — Check if Each Commit Contains Valid Jira Ticket ID

Kyler Middleton
2 min readFeb 27, 2023

This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!

Hey all!

I’ve been running a project in my enterprise to migrate all our code from an internal BitBucket server to GitHub. This BitBucket server is older, and uses a great deal of modules from the community to support all sorts of cool bespoke features. I’ve been doing my best to replicate those features in GitHub using a mixture of ingenuity and Actions.

One of those features is called the Yet Another Commit Checker. It integrated with BitBucket to validate any commit pushed to the server contains a reference to a valid Jira ticket, and works well.

The YACC (an amazing short name for this module) did all this validation pre-commit push to the server. So if a commit wasn’t valid, the git push was rejected and a message (with an adorable teddy bear) was printed to the terminal.

GitHub Cloud (different from GitHub server, which lives within your org) doesn’t support pre-commit checks. They fear they’d be DoS’d by folks sending them hundreds of thousands of commits, and the asymetric validation required on their side would down their services.

--

--

Kyler Middleton

DevNetSecOps, DevRel, cloud security chick. I will teach you, it’s unavoidable. She/Her 🏳️‍🌈🏳️‍🌈, INFJ-A, support the EFF!