> To add scripts, you’ll need a GitHub account. If you don’t have one, you can sign up here.
Once you’ve written your script, you’ll be able to add it to the repository.
This guide assumes that you’re not familiar with Git or GitHub (which is totally ok). However, if you are familiar with them, feel free to skip down to Adding your script.
Git is a version control system that developers use to keep track of changes to their code. It’s a very popular system, and it’s used by a lot of companies. GitHub is a website that lets you host your code and make it available to others, and it uses Git to track the changes in the code.
Overall, you can think of it kind of like Google Docs. You can write code, and others can read it, and you can make changes to it. And everything is synced up so everyone knows what the “correct” version of the code is. And the way in which this is done is through forks, commits, and pull requests.
Here’s what those terms mean.
A fork is a copy of this repository that you can make changes to. In this guide, you’re going to fork this repository (which is literally creating a line-by-line clone) and saving that fork onto your computer. That way, you can make changes to the code and then push those changes back to the original repository.
Forking a repository is a lot like just copying a Google Docs file.
Commits are snapshots in time. They are save points. Once you edit, add, or delete several files, you “commit” them to group those changes together. Note that this is different than saving an individual file. You can save changes as many times as you want, but you only “commit” them once to—well—commit the changes.
By now you may have realized that you’ve made changes to a copy of this repository, not the original one. Pull requests allow you to merge those changes back into the original repository.
As part of the pull request process, other collaborators can review your code. This isn’t a test to pass, but rather it’s just a constructive step to help improve the quality of your contributions. Once your pull request is merged, you’ve contributed!
> In short, you’ll create a pull request to add your script to the
/src directory. This section will walk you through that process.
When using Git and GitHub, you can either use the terminal or GitHub Desktop, which is a desktop application that provides a nice interface for Git. In thie guide, we’ll be using GitHub Desktop. You can download it at https://desktop.github.com.
Make sure you download GitHub Desktop and sign in to your GitHub account. You only need to do this once.
Checkout GitHub’s documentation for this for more detail.
And if you get stuck, you can always get help.
You will only need to clone the repository once. If you’ve already cloned it (e.g., you already contributed a script), you can skip this step.
Once you’ve written your script, you’ll now be able to add it to the repository.
You may wish to double-check your script with the script checklist before adding it. Don’t worry, though. If there’s something you missed, we’ll help you out.
src. This is where all the scripts are stored. Add your script file (e.g.,
note_resize.lua) to this
Creating a pull request is the final step in adding your script to the repository. A pull request will merge your changes into the original repository.
If you’ve already contributed, skip the first three items and move to item #4: click “Push origin”.
We will now review your script and merge it into the main repository. We may ask for some changes before it is merged, but we’ll help you through that process if needed.