DEV Community

Andreas Tiefenthaler
Andreas Tiefenthaler

Posted on • Originally published at an-ti.eu on

TIL#1: Working efficiently with GitHub Apps and using jekyll-compose

I want to document more what I have been learning throughout my days. Even as someone who writes code for 10+ years there are many new things every day that we stumble uppon.

I want to share some of those with the great dev.to community.

Here we go, two rather unrelated things:

GitHub Apps

Working with GitHub apps can be cumbersome. You have to set up a local tunnel and trigger the outgoing events using their user interface. Even though some tunnelling provider (is this a term?) allow you to replay it through their interface it can be tricky.

Today I learned that every GitHub app has a log with the full outgoing requests. Those requests include headers and body.

The request are found in your app settings under the advanced tab.

Now I can replay things with curl and no tunnelling setup from a local file.

curl -X POST "Content-Type: application/json" -d "@githubwebhookpayload.json" 'http://localhost:8080/webhook'
Enter fullscreen mode Exit fullscreen mode

jekyll-compose

If you run a static website powered by jekyll jekyll-compose makes your life easier. Work on blog posts and pages becomes more natural as you handle the drafts away from your actual posts.

Create a new draft:

$ bundle exec jekyll draft "Today I Learned #1"
Enter fullscreen mode Exit fullscreen mode

This will create a new file in the _drafts folder. Once you finished writing and editing you publish the draft:

$ bundle exec jekyll publish _drafts/today-i-learned-1.md
Draft _drafts/today-i-learned-1.md was moved to _posts/2018-09-21-today-i-learned-1.md
Enter fullscreen mode Exit fullscreen mode

That's it for today, keep on learning new things every day. 🤓

You have an idea how to make this better? Let me know: hello@an-ti.eu

Discussion (0)