DEV Community

Cover image for Lessons in GitHub and in Life #Hacktoberfest
Michelle Mei-Ling Sandford
Michelle Mei-Ling Sandford

Posted on • Updated on

Lessons in GitHub and in Life #Hacktoberfest

This month I have been working on a project. I thought it would be a simple thing taking only a few hours, but it ended up consuming all my free time and it filled my dreams too.

I wanted to set-up a GitHub Repository that people like me could use to make their #firstPR for #hacktoberfest .

And when I say "people like me" I mean people who aren't exactly confident of:

  • When to make a pull request
  • Why to make a pull request
  • What a good one looks like
  • What the difference between the PR and the Commit is
  • When to make a new branch
  • What the branch should be called
  • How to contribute to #OpenSource

Well you see, my fears were numerous.

I've been using #GitHub since May 2017 - but I was just forking around šŸ˜‰ I didn't really know what I was doing.

I wanted to learn from other people's code. Take stuff that was similar to what I wanted to do and break it down, understand it. Map the patterns of code to my understanding of what it produced. Which is fine... but it left me somewhat confused around stuff that is 2nd nature to most devs.

I looked at a simple repository that encouraged PRs from those looking for a #Good-First-Issue and see if I could build something similar, and whilst building it, learn about those things that I needed to know.

I actually never anticipated it would work as well as it did.

I started by looking at some of the #awesome-for-beginners repositories linked to Hacktoberfest. They are lists that need to be updated with content, and doing so requires forking, cloning, editing, committing, and making a pull-request. All the things I wanted to understand, but without the difficulty of writing any code - well, maybe some knowledge of Markdown or HTML - but nothing I couldn't figure out.

What I needed was to make a similar list, but include in it all the things a beginner to code needed to know to make that first PR - and then to continue on the coding journey in a non-scary way, that matched their preferred learning style, whilst giving them choices without being overwhelming.

Thus my Hacktoberfest Project was born. I'd love it if you would visit it, ā­ šŸ“ (fork it, don't eat it) and āŒš it

GitHub logo msandfor / 10-Easy-Steps

A Repository Created for #Hacktoberfest to Help Beginners Get Started with Code

Open-Source Licence MIT All Contributors Hacktoberfest

msandfor msandfor msandfor michellesandford techgirlwa MichelleSandford

banner that says I'd like to change the world but I can not find the source code

10-Easy-Steps

A Repository Created for #Hacktoberfest to Help Beginners Get Started with Code. Go to the issues, pick one of the ones labeled Hacktoberfest for more instructions on how you can contribute and make your first (second, third or forth) pull request.

If you would like to know how you can contribute to this project - do read the Contributing.MD. There are issues for begginers set-up for #Hacktoberfest and labeled as such. Each issue should give you enough guidance to complete your first (2nd, 3rd or 4th) Pull Request - but if they do not, feel free to ask for help by commenting on the issue. Do not be afraid, there is nothing but support here.

Also, I'd love it if you've found this Project useful - Could you please click on the ā­ for this repository.

A curated list of the 10 things Beginners need to know toā€¦





I started building the README.MD which is the visible page you see when you go to the GitHub repository. Making that page with the tables and the content was easy enough to do, replicating the styles from the awesome-lists but adding content that I had used to help in my own coding journey.

I noticed some other respositories had cool badges at the top, but I couldn't figure out right away how to add those in. Comparing code on repositories that had the badges with options on the https://img.shields.io website eventually yielded the results I was looking for.

Then I noticed that people usually triggered PR's as a result of Issues, which so far, I had not even thought about. From the documentation, it seemed that repository owners would ask people who wanted to contribute to raise an issue related to what they wanted to contribute, then do the rest... or they could respond to an existing issue with a contribution, and after committing it, make a PR to Merge the change in. So I created some issues that would have the Labels #good-first-issue #help-wanted #hacktoberfest - Yes that meant I needed to figure out labels as well. Then I realised Issues could be built from Templates - which would better enable #First-Timers-Only to Contribute because I could guide them to provide good Issue/PR information. So I enabled the templates and filled them in. Again - I copied the initial text from other repositories - editing them as I iterated on what I wanted to say.

Next I realised I might get a lot of PR's during Hacktoberfest - so I needed some automation, if I was going to make it work.

That's when I discovered the Probots:

GitHub logo probot / probot

šŸ¤– A framework for building GitHub Apps to automate and improve your workflow

Probot's logo, a cartoon robot

Probot

A framework for building GitHub Apps to automate and improve your workflow

npm Build Status Codecov @ProbotTheRobot on Twitter


If you've ever thought, "wouldn't it be cool if GitHub couldā€¦"; I'm going to stop you right there. Most features can actually be added via GitHub Apps, which extend GitHub and can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. Apps are first class actors within GitHub.

How it works

Probot is a framework for building GitHub Apps in Node.js, written in TypeScript. GitHub Apps can listen to webhook events sent by a repository or organization. Probot uses its internal event emitter to perform actions based on those events. A simple Probot App might look like this:

module.exports = (app) => {
  app.on("issues.opened", async (context) => {
    const issueComment
ā€¦
Enter fullscreen mode Exit fullscreen mode

These little bots very quickly became my friends, and fellow contributors. I added Welcome Bot, The Allcontributors bot, and the Auto-Assign Bot. They Welcome new Contributors, send them Gifs, add them to the Contributors acknowledgement in the Readme and assign PR's to me so I can merge them. Now my repository is looking great.

Whilst I was building 10-Easy-Steps I learnt all the things I had wanted to Learn (see above list and add Labels, #Bots and #Automation ). I made 5 issues and 37 PR's, added 3 bots, added 3 templates(one custom), added labels, make branches that aligned to most PRs and many, many commits.

So, I promised you learnings in GitHub and Life... and so far I have talked only of Github (you can get all the How-To info from my 10-easy-steps repository, by claiming an issue and following the instructions).

But in learning those technical skills, here is also what I learnt to do that applies to Life:

  • Ask Questions (If you don't ask How and Why and What and Where and Who... you will just be acting blindly without understanding)
  • Take the Initiative #JFDI #DoneIsBetterThanPerfect
  • Move out of your comfort zone - if you never try anything new you will never grow
  • It's not about the Code (It's about problem solving)
  • Copy what others have done before you (Don't reinvent the wheel)
  • Break things down into easily understandable pieces
  • Then implement in your own way (there is always more than one way to do it, do it in the way that makes sense to you)
  • ImproveĀ your existing skills (A little bit each day)
  • FindĀ mentors to help you (You are not alone)
  • BeĀ a mentor and help others (You learn so much more by teaching others - as this project has shown me)
  • BuildĀ public artifacts that help you gain visibility (check out my 10-easy-steps on Github)
  • Better visibility often means betterĀ careerĀ opportunities too
  • Youā€™ll get better atĀ people skills
  • More importantly, Youā€™ll feelĀ empowered and confident
  • Nobody knows everything, no-one is perfect, and everyone has a unique set of skills
  • Simple is far better than complex
  • #OpenSource is the Coders way of asking for #diversity of thought - #Issues are the way you can bring new ideas to the table.

Top comments (0)