diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md new file mode 100644 index 0000000..71b2cf8 --- /dev/null +++ b/CONTRIBUTION.md @@ -0,0 +1,31 @@ +# Contributing + +:wave: Hi there! + +We're thrilled that you'd like to contribute to this project. Your help is +essential for keeping it great. + +## Submitting a pull request + +We use [pull requests](https://github.com/exiguus/fta-github-action/pulls) to +contribute new features, fixes, or documentation. + +Here are a few things you can do that will increase the likelihood of your pull +request being accepted: + +- Keep your change as focused as possible. If there are multiple changes you + would like to make that are not dependent upon each other, submit them as + separate pull requests. +- Write [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). +- Write + [descriptive commit messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). + +Draft pull requests are also welcome to get feedback early on, or if there is +something blocking you. + +## Resources + +- [Development Guide](./DEVELOPMENT.md) +- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +- [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) +- [GitHub Help](https://docs.github.com/en) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..fc765f7 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,56 @@ +# Development Guide + +## Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) +- [npm](https://www.npmjs.com/get-npm) +- [Node.js](https://nodejs.org/en/download/) + +## Install dependencies + +```bash +npm install +``` + +## Package + +```bash +npm run package:watch +``` + +## Test + +```bash +npm test +``` + +## Run locally + +```bash +npm run all +node dist/index.js +``` + +## Release + +### 1. Update the version + +It is necessary to manually update and commit the version in the package.json +file. + +### 2. Tag and push the new release + +After that a helper script is available to streamline the process of tagging and +pushing new releases for GitHub Actions. + +It performs the following steps: + +1. Get the latest release tag +1. Prompt the user for a new release tag (while displaying the latest release + tag, and a regex to validate the new tag) +1. Tag the new release +1. Push the new tag to the remote + +```bash +node scripts/release.js +``` diff --git a/README.md b/README.md index b3e8360..2b5a9aa 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ jobs: ## Inputs -## file_path +### file_path Path to the project to analyze @@ -87,13 +87,13 @@ Path to the project to analyze **default**: "./src/" -## config_path +### config_path Path to config file **required**: false -## output_path +### output_path Path to output file @@ -101,7 +101,7 @@ Path to output file **default**: "./output.json" -## format +### format Output format (**default**: table) [**default**: table] [possible values: table, csv, json] @@ -110,7 +110,7 @@ csv, json] **default**: "table" -## json +### json Output as JSON @@ -118,7 +118,7 @@ Output as JSON **default**: "false" -## output_limit +### output_limit Maximum number of files to include in the table output (only applies when using table output) (**default**: 5000) @@ -127,7 +127,7 @@ table output) (**default**: 5000) **default**: "5000" -## score_cap +### score_cap Maximum FTA score which will cause FTA to throw (**default**: 1000) @@ -135,7 +135,7 @@ Maximum FTA score which will cause FTA to throw (**default**: 1000) **default**: "1000" -## include_comments +### include_comments Whether to include code comments when analysing (**default**: false) [possible values: true, false] @@ -144,7 +144,7 @@ values: true, false] **default**: "false" -## exclude_under +### exclude_under Minimum number of lines of code for files to be included in output (**default**: 6) @@ -153,7 +153,7 @@ Minimum number of lines of code for files to be included in output **default**: "6" -## exclude_directories +### exclude_directories List of directory paths separated by comma. Representing directories to exclude from the analysis. Files within any of these directories will be ignored. Paths @@ -164,7 +164,7 @@ used; any supplied values are added to the exclusions list. **default**: "/dist, /bin, /build" -## exclude_filenames +### exclude_filenames List of glob patterns separated by comma. Representing filenames to exclude from the analysis. Files matching any of these patterns will be ignored. Globs can @@ -176,7 +176,7 @@ inclusions. **default**: ".d.ts, .min.js, .bundle.js" -## extensions +### extensions List of file extensions separated by comma. Identify files that should be analyzed. JavaScript files are also accepted. The **default**s are always used; @@ -243,3 +243,14 @@ The scripts and documentation in this project are released under the - [FTA (Fast TypeScript Analyzer)](https://ftaproject.dev/) - [Create a GitHub Action Using TypeScript](https://github.com/actions/typescript-action) + +## Contributing + +Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of +conduct, and the process for submitting pull requests to us. + +## Versioning + +We use [SemVer](http://semver.org/) for versioning. For the versions available, +see the +[tags on this repository](https://github.com/exiguus/fta-github-action/tags). diff --git a/TODO.md b/TODO.md index bc88030..eebef16 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,8 @@ # TODO - [x] add unit tests -- [ ] update action.yml descriptions -- [ ] update README.md -- [ ] add more examples -- [ ] add release workflow +- [x] update action.yml descriptions +- [x] update README.md +- [x] add more examples +- [x] add release workflow - [ ] refactor file_path to project_path