A quick rundown of the pull requests I submitted for Hacktoberfest.

Hacktoberfest is an annual event to encourage involvement in open source software. Anyone around the world can earn a limited edition T-shirt, by submitting 4 or more pull requests to Github-hosted repositories during the month of October.

I wanted to take part for the past 2 years but didn’t manage in time. I was determined to earn my shirt this year! I knocked out the 4 PRs in the first week of October, and now it’s just a matter of waiting for the shirt to ship and hoping it doesn’t get “lost” in the SA customs/postal system.

This year I wanted to work on Elixir related documentation and code. I submitted 3 PRs to ElixirSchool, and 1 to Nadia.

Hacktoberfest 2019 powered by DigitalOcean and DEV.to

Elixir School

Elixir School is “the premier destination for people looking to learn and master the Elixir programming language.”

It’s a really great community of passionate Elixir developers, writing lessons and blog posts about their favorite programming language and ecosystem. They are very welcoming and friendly, and it was great to get involved.

My pull requests:

  • #2008 - Documentation in the “collections” lesson.
  • #2009 - Add an RSS feed for the site’s blog posts.
  • #2011 - Documentation in the “Ecto changesets” lesson.

Nadia

Nadia is a “Telegram Bot API Wrapper written in Elixir”.

I’ve been using this library on a side-project, and wanted to contribute back. There was a relatively simple request to add the “Pin Chat Message” API call in issue #94, so I decided to work on that.

In this PR I learned about ExVCR, an Elixir library inspired by Ruby’s VCR, which allows you to record HTTP responses in your test suite so that future test runs use the recorded responses instead.

Since it was already in use in the Nadia library, it was fairly simple to add tests for the pin/unpin chat message functionality. I already had a Telegram bot I used for testing, so I created a new group, and then posted a message using the bot. That provided the chat ID, message ID, and API responses when calling PinChatMessage and UnpinChatMessage.

The ExVCR.Config module also provides the filter_sensitive_data/2 function to strip sensitive data out of the recorded response!

My pull request:

  • #96 - Implement pinChatMessage and unpinChatMessage.

Have you earned your shirt yet? Head to the Hacktoberfest website and start hacking!

Previous post: Hello World

Next post: Style updates

Byron Hambly

Rust 💜 Elixir 🖤

RSS delta1 byronhambly byron@hambly.dev


Published