Skip to content

Commit

Permalink
Automate logs to GitHub comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonallured committed Oct 1, 2019
1 parent 564ceb1 commit 87176d4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sharpen/log_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## sharpen.log

<details>

```
SHARPEN
```

</details>

## replug.log

<details>

```
REPLUG
```

</details>
14 changes: 14 additions & 0 deletions sharpen/script.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

sharpen_log = "#{ENV['DOTHOME']}/sharpen.log"
replug_log = "#{ENV['DOTHOME']}/replug.log"

sharpen_details = File.read sharpen_log
replug_details = File.read replug_log

template = File.read "#{ENV['DOTHOME']}/sharpen/log_template.txt"

template.gsub!('SHARPEN', sharpen_details)
template.gsub!('REPLUG', replug_details)

puts template

0 comments on commit 87176d4

Please sign in to comment.