Skip to content

Commit

Permalink
docs: extract contributing guide from readme
Browse files Browse the repository at this point in the history
The README.md was becoming long. It also didn't really explain to
users and potential contributors how they can contribute.
  • Loading branch information
korthout committed Feb 26, 2023
1 parent 44c7789 commit 61ad51a
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 42 deletions.
69 changes: 69 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributing to backport action

I welcome contributions for feature requests and bug reports, as well as for docs and code changes.

## Feature requests and bug reports

If you would want to see something added or changed, or encountered a bug.
Please open an [issue on GitHub](https://github.com/korthout/backport-action/issues).

## Docs changes

Saw a typo or want to make other changes to the [README](https://korthout.github.io/backport-action/blob/main/README.md)?
Feel free to open a pull request with your changes.

## Code changes

I welcome code changes.
If you're thinking of opening a large pull request, please consider opening an issue on GitHub first to discuss it.

### Build from source

Install the dependencies.

```
npm install
```

Apply the automatic formatting to the source code.

```
npm run format
```

Build and package the action for distribution.

```
npm run build && npm run package
```

### Testing

Run all tests.

```
npm test
```

Run all tests with additional console output.

```
npm run test-verbose
```

Shorthand for format, build, package and test.

```
npm run all
```

This action can also be tested using [korthout/backport-action-test](https://github.com/korthout/backport-action-test).

### Releases

The distribution is hosted in this repository under `dist`.
Simply build and package the distribution and commit the changes to publish a new snapshot version.

To release a version, run the [Release](https://github.com/korthout/backport-action/actions/workflows/release.yml) workflow from the branch that should be released.
This sets the release version and tags the release commit.
It also creates/moves the major and minor tags (e.g. `v1` and `v1.2`) to the latest corresponding release as [officially recommended](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md).
42 changes: 0 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,45 +174,3 @@ Output | Description
-------|------------
`was_successful` | Whether or not the changes could be backported successfully to all targets. Either `true` or `false`.
`was_successful_by_target` | Whether or not the changes could be backported successfully to all targets - broken down by target. Follows the pattern `{{label}}=true\|false`.

## Local compilation

Install the dependencies

```
npm install
```

Build the typescript and package it for distribution

```
npm run format && npm run build && npm run package
```

## Testing

Run all tests

```
npm test
```

Run all tests with additional console output

```
npm run test-verbose
```

Shorthand for format, build, package and test

```
npm run all
```

This action can also be tested using [korthout/backport-action-test](https://github.com/korthout/backport-action-test).

## Releases

The distribution is hosted in this repository under `dist`.
Simply build and package the distribution and commit the changes to release a new version.
Release commits should also be tagged (e.g. `v1.2.3`) and the major release tag (e.g. `v1`) should be moved as [officially recommended](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md).

0 comments on commit 61ad51a

Please sign in to comment.