Skip to content

Latest commit

 

History

History
131 lines (81 loc) · 6.55 KB

CONTRIBUTING.md

File metadata and controls

131 lines (81 loc) · 6.55 KB

Contributing guide

Thank you for investing your time in contributing to our project! With your contribution you help Garry's Mod Lua developers get accurate and the latest autocomplete suggestions for the GLua API.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

New contributor guide

To get an overview of the project, read the README. Here are some general resources to help you get started with open source contributions:

Getting started

This project automatically builds Garry's Mod Lua API annotations for use with LuaLS/lua-language-server. It does this by scraping the Garry's Mod Wiki.

The above means that if you want to improve or correct the definitions, you'll have to either:

The addon for Lua Language Server is seperate from this project. If you want it to be updated, you'll have to contribute to that project according to these instructions.

Contributing to this project

Reporting an issue

If you find an error in the scraper, please open an issue and describe the problem. If you can, please include a link to the page on the Garry's Mod Wiki that is incorrectly scraped.

Creating a pull request

You can help the project even more by fixing the error yourself. To do this, you'll have to fork this project, make corrections and create a pull request with your changes. Before you do that, please consider the following:

  • Create an issue before you start working on a pull request. This way you can get feedback on your idea before you spend time on it.
  • Make your changes on a seperate branch and name it according to this convention:
    • bugfix/<short-bug-description> if you're fixing a bug (e.g. bugfix/incorrect-argument-type).
    • feature/<short-feature-description> if you're adding a new feature (e.g. feature/add-example-links).
    • docs/<short-docs-description> if you're updating the documentation (e.g. docs/update-contributing-guide).
  • Cluster changes in small commits. This makes it easier to review your changes.
  • Do not create a single PR with multiple unrelated changes. Create seperate PRs for each change. This makes it easier to review your changes.
  • Make sure your changes are correct and don't break anything.
  • Add tests for your changes if possible.
  • Clearly describe your changes (and why you made them) in the pull request description.

Step-by-step guide to contribute to this project

  1. Fork this project to your own GitHub account.

  2. Clone the forked project to your local machine.

  3. Create a new branch for your changes, for example:

    git checkout -b bugfix/incorrect-argument-type
  4. Make your changes and commit them:

    git add .
    git commit -m "Fix incorrect argument type"
  5. Push your changes to your forked project:

    git push origin bugfix/incorrect-argument-type
  6. Create a pull request with your changes.

  7. Wait for your pull request to be reviewed and merged.

Thanks in advance for your contribution!

Getting acknowledged for your contribution

We use All Contributors to acknowledge contributions. If you want to be added to the list of contributors, please comment to your pull request with:

@all-contributors please add @<your-github-username> for <contributions>

» Learn more about the All Contributors bot here

Updating the addon for Lua Language Server

At the first of every month the scraper runs and updates the addon for Lua Language Server to the lua-language-server-addon branch in this repo. However this does not automatically update the Lua Language Server Addon, since the branch is only a sub repository in the LuaLS/LLS-Addons repository

Step-by-step guide to update our addon at LuaLS/LLS-Addons

  1. Go to the Lua Language Server Addons repository and take note of their contribution guidelines

  2. Fork the Lua Language Server Addon Repository to your own GitHub account.

  3. Clone the forked project to your local machine.

  4. Create a new branch for your changes, for example:

    git checkout -b update-garrysmod-addon
  5. Update the garrysmod sub repository to the latest commit in the lua-language-server-addon branch in this repo:

    git submodule update --init --remote addons/garrysmod/module
  6. Commit your changes:

    git add .
    git commit -m "Updated garrysmod addon"
  7. Push your changes to your forked project:

    git push origin update-garrysmod-addon
  8. Create a pull request at the LuaLS/LLS-Addons repository with your changes. Make sure to allow edits from maintainers.

  9. Wait for your pull request to be reviewed and merged.

Thanks in advance for your help in keeping our addon up to date!