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

Add contributing guidelines and release drafter #8

Merged
merged 4 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
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
53 changes: 53 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
-
title: 'Features'
labels:
- 'enhancement'
- 'feat'
- 'feature'
-
title: 'Bug Fixes'
labels:
- 'bug'
- 'bugfix'
- 'fix'
-
title: 'Maintenance'
labels:
- 'chore'
- 'style'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels: ['major']
minor:
labels: ['minor']
patch:
labels: ['patch']
default: patch
exclude-labels: ['skip']
autolabeler:
-
label: 'bug'
branch:
- '/bug\/.+/'
- '/bugfix\/.+/'
- '/fix\/.+/'
-
label: 'enhancement'
branch:
- '/enhancement\/.+/'
- '/feat\/.+/'
- '/feature\/.+/'
-
label: 'chore'
branch:
- '/chore\/.+/'
- '/style\/.+/'
template: |
## Release notes

$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release drafter

on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
name: Update draft release
runs-on: ubuntu-latest
steps:
-
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75 changes: 75 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Contributing guidelines

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to Python version of
**spid-compliant-certificates** project.
These are mostly guidelines, not rules. Use your best judgment, and feel free
to propose changes to this document in a pull request.

## How to contribute

1. If you found something to add/fix, open an issue an discuss with the
community

2. Once ready, fork the repository (or pull from `main` if already forked)

3. In your fork, create a branch starting from `main` and name it by following
the [naming conventions](#branches-naming-conventions)

4. Make your changes by following the [coding guidelines](#coding-guidelines)

5. Push the changes on your branch and create a pull request

6. Wait for a review

## Coding guidelines

1. Use four spaces for intentation (leave TABS to Java lovers)

2. Use type hints (see [PEP484](https://www.python.org/dev/peps/pep-0484/))
when a new function is defined

3. Use `\n` as end of line (we mainly develop on Linux)

4. Before pushing your Python code, lint it with
[`flake8`](https://flake8.pycqa.org/en/latest/)
and [`isort`](https://pycqa.github.io/isort/)
(see [PEP8](https://www.python.org/dev/peps/pep-0008/))

5. Before pushing your changes on Dockerfiles, lint them with
[`hadolint`](https://github.com/hadolint/hadolint)

## Branches naming conventions

Releases are issued by making use of
[Release Drafter](https://github.com/release-drafter/release-drafter) action.
In order to propery work, some naming conventions for branches must be
followed.

### Bugfix

If you're working on a bugfix, please name your local branch with one of
the following prefixes:

- `bug` (e.g. `bug/wrong-url-in-configuration`)
- `bugfix` (e.g. `bugfix/wrong-url-in-configuration`)
- `fix` (e.g. `fix/wrong-url-in-configuration`)

### New feature

If you're working on a new feature, please name your local branch with one
of the following prefixes:

- `enhancement` (e.g. `enhancement/enable-2fa-with-solokey`)
- `feat` (e.g. `feat/enable-2fa-with-solokey`)
- `feature` (e.g. `feature/enable-2fa-with-solokey`)

### Maintenance

If you're working on maintenance tasks (e.g. documentation, repository
management, source styling), please name your local branch with one of the
following prefixes:

- `chore` (e.g. `chore/remove-trailing-spaces`)
- `style` (e.g. `style/remove-trailing-spaces`)