Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(backend): Added PR naming information to the CONTRIBUTING.md #2236

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 82 additions & 36 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,105 @@ These are mostly guidelines, not rules. Use your best judgment, and feel free to
## Guidelines

- Make sure you're editing the latest version.
- If you propose changes, make sure they don't break anything else in the guides.
- If you propose changes, ensure they don't break anything else in the guides.
- Make sure that after the changes, you don't get any [markdownlint](https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md) errors
- If the `metadata.json` and `metadata.schema.json` needs changes, announce it first in the Discord `#development` channel and ping `voidpointer` and `nitsua` so the 3rd party apps don't break :bangbang:

## Branch naming

We're trying to be as consistent as possible to automate the changelog.
> [!IMPORTANT]
> We're trying to be as consistent as possible because of the automation of the changelog.

- **feat/xxx** Commits, which adds a new feature
- **fix/xxx** Commits, that fixes a bug/issue
- **style/xxx** Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
- **chore/xxx** Miscellaneous commits (administrative / cleanup / backend)
- **feat/xxx** Commits that adds a new feature
- **fix/xxx** Commits that fixes a bug/issue
- **style/xxx** Commits that do not affect the meaning (white-space, formatting, missing semi-colons, grammar, etc.)
- **chore/xxx** Miscellaneous commits (administrative, cleanup, backend, etc)

Where 'xxx' can stand for Starr/Sonarr/Radarr/Guide etc
> [!note]
> Where `xxx` can stand for the main [Guide Categories](#guide-categories) in the guide.

_Examples:_

- `feat/Starr-ELEANOR-to-Scene-CF`
- `feat/Radarr-CiNEPHiLES-to-Remux-Tier-02`
- `feat/maintenance`
- `fix/dv-hdr10-cf-should-match-dv-hdr10+`

[Source](https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13#types)
- `feat/radarr-CiNEPHiLES-to-Remux-Tier-02`
- `style/radarr minor-grammar corrections`
- `fix/starr-dv-hdr10-cf-should-match-dv-hdr10+`

## Pull Request naming

We're trying to be as consistent as possible to automate the changelog.
> [!IMPORTANT]
> Because the changelog is created automatically, we want to make the PR name as clear and consistent as possible.

- **feat(xxx):** Commits, that adds a new feature
- **fix(xxx):** Commits, that fixes a bug/issue
- **style(xxx):** Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
- **chore(xxx):** Miscellaneous commits (administrative / cleanup / backend)
The PR naming consists of 3 parts.

Where 'xxx' can stand for Starr/Sonarr/Radarr/Guide etc
part1(part2): part3 => type(guide category): short detailed descriptions

_Examples:_

- `feat(starr): add ELEANOR to Scene CF`
- `feat(radarr): add CiNEPHiLES to Remux Tier 02`
- `feat(maintenance): various changes to the Starr CFs`
- `fix(starr): DV HDR10 CF should match DV HDR10+`
### Types

[Source](https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13#types)

- **feat(xxx):** Commits that adds a new feature
- **fix(xxx):** Commits that fixes a bug/issue
- **style(xxx):** Commits that do not affect the meaning (white-space, formatting, missing semi-colons, grammar, etc)
- **chore(xxx):** Miscellaneous commits (administrative, cleanup, backend, etc)

> [!note]
> Where `xxx` can stand for the main [Guide Categories](#guide-categories) in the guide.

### Guide categories

The following Guide categories can be used for the PR name.

```yml
- type(radarr): #Radarr related
- type(radarr-german): #Radarr related but for the German guides
- type(radarr-french): #Radarr related but for the French guides
- type(radarr-anime): #Radarr related but for the Anime guides
- type(sonarr): #Sonarr related
- type(sonarr-german): #Sonarr related but for the German guides
- type(sonarr-french): #Sonarr related but for the French guides
- type(sonarr-anime): #Sonarr related but for the Anime guides
- type(starr): #Sonarr and Radarr related
- type(starr-german): #Sonarr and Radarr related but for the German guides
- type(starr-french): #Sonarr and Radarr related but for the French guides
- type(starr-anime): #Sonarr and Radarr related but for the Anime guides
- type(prowlarr): #Prowlarr related
- type(lidarr): #Lidarr related
- type(bazarr): #Bazarr related
- type(hardlinks): #Hardlinks/File and Folder Structure related
- type(downloaders): #Downloaders related
- type(plex): #Plex related
- type(guide-sync): # Officially supported third-party party Guide Sync Tools related
- type(misc): #Miscellaneous guides that do not fit in any other categories but are still related to Radarr/Sonarr, etc
- type(glossary): #Any additions/changes to the glossary page
```

_Examples:_

- feat(guide-sync): Add more groups to give the user more personal options
- feat(guide-sync): Add new Quality Profiles for Radarr/Sonarr
- feat(starr): [NEW Guide] How does the current rank logic work
- feat(downloaders): [NZBGet] Updated the guide to reflect the recent changes with v24.5

## When doing a PR that is WIP

When doing a PR that is in progress and not yet complete/ready for review or not yet done fully, please ensure it is a **DRAFT Pull Request**
> [!TIP]
> When doing a PR that is in progress and not yet complete/ready for review or not yet done fully, please ensure it is a **DRAFT Pull Request**

## Radarr/Sonarr Custom Format (JSON)

### Release Group Reclassifications, Removals, or Additions

- When adding a release group to a Custom Format for whatever reason, please explain why it's added/removed/moved in the PR.
> [!WARNING]
> **When adding a release group to a Custom Format, please explain why it's added/removed/moved in the PR.**

### General Guidelines

- Custom Format name needs to match JSON name :bangbang:
- No hashcode can exist multiple times :bangbang:
> [!CAUTION]
>
> - Custom Format name needs to match JSON name :bangbang:
> - No hashcode can exist multiple times :bangbang:
>
- Tiers only hold release groups that have at least done several dozen objectively high-quality releases or are added for a specific reason. (If they do mainly niche stuff and/or foreign stuff, they won't be added)
- All Tier Groups must use retail sources. Fanres and upscaled groups are forbidden. This is due to the high effort required and the near impossibility of systematically guaranteeing quality without manually checking every single movie.
- JSON file format shall consist of the following TRaSH-specific data appended to the JSON exported from Starr
Expand All @@ -92,11 +133,12 @@ General Structure

### File Naming

- JSON file names are always written in lowercase, spaces are replaced by a dash, and no spaces or special characters except a dash :bangbang:
> [!CAUTION]
> JSON file names are always written in lowercase, spaces are replaced by a dash, and no spaces or special characters except a dash :bangbang:

### Hashcode

- When adding the hashcode for **Radarr**, use the following naming convention: `CF_name` e.g. the Custom Format `BR-DISK` would be the hash of [`BR-DISK`](https://md5.gromweb.com/?string=BR-DISK)
- When adding the hashcode for **Radarr**, use the following naming convention: `CF_name` e.g., the Custom Format `BR-DISK` would be the hash of [`BR-DISK`](https://md5.gromweb.com/?string=BR-DISK)
When adding the hashcode for **Radarr Anime**, use the following naming convention: `Radarr Anime CF_name`. For example, the Custom Format `BR-DISK` would be the hash of [`Radarr Anime BR-DISK`](https://md5.gromweb.com/?string=Radarr+Anime+BR-DISK).
- When adding the hashcode for **Sonarr**, use the following naming convention: `Sonarr CF_name` e.g. the Custom Format `BR-DISK` would be the hash of [`Sonarr BR-DISK`](https://md5.gromweb.com/?string=Sonarr+BR-DISK).
- When adding the hashcode for **Sonarr Anime**, use the following naming convention: `Sonarr Anime CF_name` e.g. the Custom Format `BR-DISK` would be the hash of [`Sonarr Anime BR-DISK`](https://md5.gromweb.com/?string=Sonarr+Anime+BR-DISK).
Expand Down Expand Up @@ -133,17 +175,21 @@ When updating or adding a new CF, the test case URL (`trash_regex`) needs to be
```

- This allows for Custom Formats to be assigned different scores for different profiles
- Default Scores of 0 (e.g. as in `trash_scores.default`) are FORBIDDEN
- Default Scores of 0 (e.g., as in `trash_scores.default`) are FORBIDDEN

## YAML file naming

- If a hashcode is needed **No** hashcode can exist multiple times :bangbang:
> [!CAUTION]
>
> - If a hashcode is needed **No** hashcode can exist multiple times :bangbang:
>
- Use [this website](https://md5.gromweb.com) to generate an md5 hash
- YAML file names are always written in small letters, spaces are replaced by a dash, and no spaces or special characters except a dash :bangbang:

## Quality Profiles and 3rd party sync apps

When creating a new quality profile or editing an existing one, it's mandatory to ensure that these settings are also updated/added to the following locations for the third-party sync apps.
> [!IMPORTANT]
> When creating a new quality profile or editing an existing one, it's mandatory to ensure that these settings are updated/added to the following locations for the third-party sync apps.

- Radarr: `docs/json/radarr/quality-profiles`
- `docs/json/radarr/cf-groups`
Expand All @@ -169,7 +215,7 @@ These prerequisites are taken from the [mkdocs installation instructions][mkdoci

[mkdocinstall]: https://www.mkdocs.org/user-guide/installation/

Alternatively you can check out the docker container and instructions maintained by [zakkarry](https://github.com/zakkarry) specifically for development of the guides [here](https://gist.github.com/zakkarry/1305f713539c9fee22bdeeddcff3a263). The documentation in the README explains the installation process.
Alternatively, you can check out the docker container and instructions maintained by [zakkarry](https://github.com/zakkarry) specifically for developing the guides [here](https://gist.github.com/zakkarry/1305f713539c9fee22bdeeddcff3a263). The documentation in the README explains the installation process.

### Mkdocs Installation

Expand All @@ -179,8 +225,8 @@ First, install mkdocs:
pip install mkdocs
```

Then, install dependent modules using the command below. This command should be run in the repository's root directory (i.e., where the `requirements.txt` file is). If the `pip` command does
If it does not work, refer to the mkdocs installation page linked in the Prerequisite section above.
Then, you can install dependent modules using the command below. This command should be run in the repository's root directory (i.e., where the `requirements.txt` file is). If the `pip` command does
If it doesn't work, please check the mkdocs installation page linked in the Prerequisite section above.

```bash
pip install -r docs/requirements.txt
Expand Down
Loading