Changelog: Github PR Liquid Tag Support
Tags: changelog, meta, opensource, github
Published: 2019-02-15 19:07:19

---
title: "Changelog: Github PR Liquid Tag Support"
published: true
description: Added support for Github Pull Requests in liquid tags
tags: changelog, meta, opensource, github
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kqx6pa5lm35tv2eaiz3h.png
---

Last week I made an issue on Github thinking there was a bug with the Github liquid tag because it was giving me an error when I was trying to embed a Github Pull Request.
{% github https://github.com/thepracticaldev/dev.to/issues/1760 %}

Then @andy informed me that this wasn't actually a bug but that the Github liquid tag just doesn't support PR URL's. To me this was strange because Github Issues and PR's are very similar and I expected that the liquid tag would also support it.

---

Sunday I started setting up my Ruby environment, I have no previous experience with Ruby so this was a bit of a challenge but with Google and following the [DEV installation documentation](https://docs.dev.to/installation/mac-os/) I was able to get it all up and running.
I however was confused when I was getting errors in `config/application.yml`, I copied the sample file exactly as was told in the docs but I didn't know that you had to remove empty/unused config variables.

After that I started hacking away. It was more a trial and error kind of thing than actual development, I had to look up how simple things where done in Ruby and also did a lot of playing around (change something and see what happens, mostly broke it lol).
Eventually I was able to get the expected result and I didn't seem to break the old Github liquid tag behaviour. So at this point I was pretty happy with myself and called it a success.

---

Now the big surprise (to me) was when I tried to commit, Husky lint-staged pre-commit hook ran over the code and it gave me errors. Now you might think why is this a surprise? Everyone has had a build/lint fail before. Well the big surprise was because it gave me errors on parts of code that I didn't even touch.

So I assume that there have been people in the past that have used `--no-verify` to commit changes without running the pre-commit hook and didn't follow project standards. I fixed most of the errors but there was an issue with a code block that when I changed it into valid html (to solve the error) it would parse the html instead of showing it in the code block, probably the reason why that person skipped the pre-commit hook (and every person after that).

---

In the end even tough it is a small change I am happy that I was able to make this PR and again contribute to the DEV community, I hope people think it is a useful change and will use it in their posts.

*Now I am waiting until the Pull Request gets reviewed and merged so that I can publish this post without raising an `Invalid Github Repo link` error.*

`{% github https://github.com/thepracticaldev/dev.to/pull/1784 %}`

{% github https://github.com/thepracticaldev/dev.to/pull/1784 %}

---

What are your opinions about the pre-commit hook? Should it be removed (because people already seem to skip it) or should it be enforced more strictly? 
Maybe someone from the DEV team can comment about it and open a discussion.