mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-09 22:31:53 +00:00
Add pre commit config
This commit is contained in:
parent
d37ef318b1
commit
a165c16553
6 changed files with 38 additions and 12 deletions
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -7,4 +7,3 @@ Remove this section if not relevant
|
|||
|
||||
### New Behavior
|
||||
Remove this section if not relevant
|
||||
|
||||
|
|
1
.github/stale.yml
vendored
1
.github/stale.yml
vendored
|
@ -30,4 +30,3 @@ closeComment: false
|
|||
|
||||
# Limit to only `issues` or `pulls`
|
||||
only: issues
|
||||
|
||||
|
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -2807,5 +2807,3 @@ jobs:
|
|||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy py3-git-2019-2-ubuntu-1804
|
||||
|
||||
|
||||
|
|
8
.github/workflows/templates/generate.py
vendored
Normal file → Executable file
8
.github/workflows/templates/generate.py
vendored
Normal file → Executable file
|
@ -131,9 +131,11 @@ def generate_test_jobs():
|
|||
with open('../main.yml', 'w') as wfh:
|
||||
with open('main.yml') as rfh:
|
||||
wfh.write(
|
||||
rfh.read().format(
|
||||
lint_job=lint_job,
|
||||
test_jobs=test_jobs,
|
||||
'{}\n'.format(
|
||||
rfh.read().format(
|
||||
lint_job=lint_job,
|
||||
test_jobs=test_jobs,
|
||||
).strip()
|
||||
)
|
||||
)
|
||||
|
||||
|
|
28
.pre-commit-config.yaml
Normal file
28
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
minimum_pre_commit_version: 1.15.2
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.1.0
|
||||
hooks:
|
||||
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
||||
- id: trailing-whitespace # Trims trailing whitespace.
|
||||
args: [--markdown-linebreak-ext=md]
|
||||
- id: mixed-line-ending # Replaces or checks mixed line ending.
|
||||
args: [--fix=lf]
|
||||
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
|
||||
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: generate-actions-workflow
|
||||
name: Generate Github Actions Workflow
|
||||
entry: .github/workflows/templates/generate.py
|
||||
pass_filenames: false
|
||||
files: '.github/workflows/templates/.*'
|
||||
language: script
|
||||
|
||||
- id: shellcheck
|
||||
name: Run ShellCheck against bootstrap-salt.sh
|
||||
entry: koalaman/shellcheck-alpine:v0.6.0 shellcheck -s sh -f tty
|
||||
files: 'bootstrap-salt\.sh'
|
||||
language: docker_image
|
|
@ -15,7 +15,7 @@ The Salt Bootstrap issue tracker is used for feature requests and bug reports.
|
|||
|
||||
A bug is a *demonstrable problem* that is caused by the code in the repository.
|
||||
|
||||
Please read the following guidelines before you
|
||||
Please read the following guidelines before you
|
||||
[file an issue](https://github.com/saltstack/salt-bootstrap/issues/new).
|
||||
|
||||
1. **Use the GitHub issue search** -- check if the issue has
|
||||
|
@ -25,7 +25,7 @@ Please read the following guidelines before you
|
|||
please try to bootstrap using the bootstrap scirpt from the develop branch. The
|
||||
issue you are having might have already been fixed and it's just not yet included
|
||||
in the stable release.
|
||||
|
||||
|
||||
```
|
||||
curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git develop
|
||||
|
@ -73,7 +73,7 @@ easily solved another way, which is a great reason to ask first.
|
|||
|
||||
Fixes for issues are very welcome!
|
||||
|
||||
Once you've fixed the issue you have in hand, create a
|
||||
Once you've fixed the issue you have in hand, create a
|
||||
[pull request](https://help.github.com/articles/creating-a-pull-request/).
|
||||
|
||||
Salt Bootstrap maintainers will review your fix. If everything is OK and all
|
||||
|
@ -102,7 +102,7 @@ repo from the PR, etc.
|
|||
|
||||
#### Lint Check
|
||||
|
||||
The pull request test that matters the most, and the contributor is directly
|
||||
The pull request test that matters the most, and the contributor is directly
|
||||
responsible for fixing, is the Lint check. This check *must* be passing before
|
||||
the contribution can be merged into the codebase.
|
||||
|
||||
|
@ -149,7 +149,7 @@ Typically, SaltStack's release team determines when it would be good to release
|
|||
a new stable version.
|
||||
|
||||
Timing the release usually involves an analysis of the following:
|
||||
|
||||
|
||||
- Updates for major feature releases in [Salt](https://github.com/saltstack/salt)
|
||||
- Support for new versions of major operating systems
|
||||
- Types of fixes submitted to `develop` since the last release
|
||||
|
|
Loading…
Add table
Reference in a new issue