From e26bf79ffcd909492b80bf4ad80cffc482581f2b Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Tue, 15 Sep 2020 16:57:36 +0300 Subject: [PATCH] Draft contributors.md update (#97) * Draft contributors.md update This is a proposed updated to the contributors.md document inspired by the contributing guidelines of the actions/cache project [1]. There are some differences, most notable the inclusion of "Development Details" which explains and motivates the development tools (to an extend). -- 1. https://github.com/actions/cache/blob/eed9cfe64d00dd64cbb36bec915d41dd6fab9f6c/CONTRIBUTING.md * Split Contributing Guidelines and Development Handbook Split the "Contributing Guidelines" currently found in docs/contributors.md into a CONTRIBUTING.md file, containing the Contributing Guidelines, and a docs/development.md file, containing details on how the development/testing of this project works. --- CONTRIBUTING.md | 26 ++++++++++++++++++++++++++ docs/contributors.md | 22 ---------------------- docs/development.md | 5 +++++ 3 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 CONTRIBUTING.md delete mode 100644 docs/contributors.md create mode 100644 docs/development.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ebf4816 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing Guidelines + +Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. + +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open-source license](../LICENSE). + +## Submitting a Pull Request + +1. [Fork](https://github.com/actions/labeler/fork) and clone the repository +1. Configure and install the dependencies: `npm install` +1. Create a new branch: `git checkout -b my-branch-name` +1. Make your change and build the action using `npm run build` +1. Push to your fork and [submit a pull request](https://github.com/actions/labeler/compare) +1. Pat your self on the back and wait for your pull request to be reviewed and merged. + +Here are a few things you can do that will increase the likelihood of your pull request being accepted: + +- Follow the coding style used in this project. You can do this by running `npm run format`. +- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. +- Write [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). + +## Resources + +- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) +- [GitHub Help](https://help.github.com) diff --git a/docs/contributors.md b/docs/contributors.md deleted file mode 100644 index fece2ea..0000000 --- a/docs/contributors.md +++ /dev/null @@ -1,22 +0,0 @@ -# Contributors - -### Checkin - -- Do checkin source (src) -- Do checkin build output (lib) -- Do checkin runtime node_modules -- Do not checkin devDependency node_modules (husky can help see below) - -### devDependencies - -In order to handle correctly checking in node_modules without devDependencies, we run [Husky](https://github.com/typicode/husky) before each commit. -This step ensures that formatting and checkin rules are followed and that devDependencies are excluded. To make sure Husky runs correctly, please use the following workflow: - -``` -npm install # installs all devDependencies including Husky -git add abc.ext # Add the files you've changed. This should include files in src, lib, and node_modules (see above) -git commit -m "Informative commit message" # Commit. This will run Husky -``` - -During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) as well as pruning out devDependencies using `npm prune --production`. -It will also make sure these changes are appropriately included in your commit (no further work is needed) \ No newline at end of file diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..40aef06 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,5 @@ +# Development Handbook + +This project is written in [TypeScript](https://www.typescriptlang.org/), a typed variant of JavaScript, and we use [Prettier](https://prettier.io/) to get a consistent code style. + +Because of how GitHub Actions are run, the source code of this project is transpiled from TypeScript into JavaScript. The transpiled code (found in `lib/`) is subsequently compiled using [NCC](https://github.com/vercel/ncc/blob/master/readme.md) (found in `dist/`) to avoid having to include the `node_modules/` directory in the repository.