Skip to content

Commit

Permalink
docs(readme): add contribute and development guide
Browse files Browse the repository at this point in the history
  • Loading branch information
exiguus committed Feb 7, 2024
1 parent 1f13a62 commit 26d9812
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 16 deletions.
31 changes: 31 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -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)
56 changes: 56 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -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
```
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,29 @@ jobs:
## Inputs
## file_path
### file_path
Path to the project to analyze
**required**: true
**default**: "./src/"
## config_path
### config_path
Path to config file
**required**: false
## output_path
### output_path
Path to output file
**required**: false
**default**: "./output.json"
## format
### format
Output format (**default**: table) [**default**: table] [possible values: table,
csv, json]
Expand All @@ -110,15 +110,15 @@ csv, json]
**default**: "table"
## json
### json
Output as JSON
**required**: false
**default**: "false"
## output_limit
### output_limit
Maximum number of files to include in the table output (only applies when using
table output) (**default**: 5000)
Expand All @@ -127,15 +127,15 @@ table output) (**default**: 5000)
**default**: "5000"
## score_cap
### score_cap
Maximum FTA score which will cause FTA to throw (**default**: 1000)
**required**: false
**default**: "1000"
## include_comments
### include_comments
Whether to include code comments when analysing (**default**: false) [possible
values: true, false]
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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).
8 changes: 4 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 26d9812

Please sign in to comment.