|
2 | 2 | layout: post
|
3 | 3 | title: "How to Calculate Tech Debt Using Skunk on GitHub Actions"
|
4 | 4 | date: 2020-02-10 16:16:00
|
5 |
| -categories: ["tech-debt"] |
| 5 | +categories: ["code-quality"] |
6 | 6 | author: etagwerker
|
7 | 7 | ---
|
8 | 8 |
|
9 | 9 | In preparation for my talk at [RubyConf Australia](https://www.rubyconf.org.au/) this
|
10 |
| -month, I've been working on a way to make it easy for anyone to run `skunk` on their |
11 |
| -Ruby projects. In order to do that I decided to use GitHub Actions. It's a powerful |
| 10 | +month, I've been working on a way to make it easy for anyone to run [`skunk`](https://www.fastruby.io/blog/code-quality/intruducing-skunk-stink-score-calculator.html) on |
| 11 | +their Ruby projects. In order to do that I decided to use GitHub Actions. It's a powerful |
12 | 12 | service by GitHub and it's quite easy to set up.
|
13 | 13 |
|
14 | 14 | This is an article about the process that I followed and how you can use it in your own
|
@@ -110,8 +110,8 @@ steps synchronously, from top to bottom. If you want to run `skunk` for a Rails
|
110 | 110 | application, you can change the last step to `skunk app/`
|
111 | 111 |
|
112 | 112 | The next thing I wanted to do is run `skunk` on a pull request in order to
|
113 |
| -compare the _Stink Score_ between the pull request and `master`. This will help |
114 |
| -us answer this question: |
| 113 | +compare the [_Stink Score_](https://github.com/fastruby/skunk#what-is-the-stinkscore) |
| 114 | +between the pull request and `master`. This will help us answer this question: |
115 | 115 |
|
116 | 116 | > Are we increasing or decreasing the tech debt average in our project?
|
117 | 117 |
|
@@ -147,9 +147,9 @@ jobs:
|
147 | 147 | fi
|
148 | 148 | ```
|
149 | 149 |
|
150 |
| -There is some `bash` _magic_ in there. The GitHub Action will do one thing if |
151 |
| -you are within the context of a pull request (compare action), and another thing |
152 |
| -if it is running a commit pushed to the `master` branch. |
| 150 | +There is some `bash` logic in there: The GitHub Action will [compare your branch vs. master](https://github.com/fastruby/skunk#comparing-one-branch-vs-another) if |
| 151 | +it is running within the context of a pull request, or [generate a tech debt report](https://github.com/fastruby/skunk#getting-a-sorted-list-of-stinkiest-files) if |
| 152 | +it is running a commit pushed to the `master` branch. |
153 | 153 |
|
154 | 154 | One last thing I had to add was a step to generate [SimpleCov](https://github.com/colszowka/simplecov)'s
|
155 | 155 | resultset JSON file. Skunk is most useful when it considers code coverage data.
|
|
0 commit comments