-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 48fda0b
Showing
6 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "renovate/**" | ||
pull_request: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | ||
|
||
- name: Cache pre-commit | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: |- | ||
python -m pip install pre-commit | ||
pre-commit install | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files --color always --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.3 | ||
hooks: | ||
- id: prettier | ||
- repo: https://github.com/renovatebot/pre-commit-hooks | ||
rev: 37.12.1 | ||
hooks: | ||
- id: renovate-config-validator | ||
args: [renovate/default-config.json] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
"schedule:weekdays", | ||
":automergeAll", | ||
":automergeBranch", | ||
":disableDependencyDashboard", | ||
":enablePreCommit" | ||
], | ||
"commitMessageAction": "Renovate:", | ||
"packageRules": [ | ||
{ | ||
"description": "Shorten commit titles", | ||
"commitMessageTopic": "{{depName}}", | ||
"matchManagers": ["github-actions", "pre-commit"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# .github | ||
|
||
Default files for all repositories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Renovate | ||
|
||
To enable `Renovate` in a given repository, one must install and enable the | ||
[GitHub application](https://github.com/apps/renovate). | ||
One must then make a `.renovaterc.json` file in the repository, of the following | ||
form. | ||
Note, the two `/` is intentional. | ||
|
||
```json | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>UCL-ARC/.github//renovate/default-config.json"] | ||
} | ||
``` | ||
|
||
## Automerging | ||
|
||
To benefit from the automerging capabilities of the default config it is | ||
_highly_ recommended having `required` status checks that run on anything that | ||
`Renovate` updates. | ||
In `GitHub Actions` this can be performed with the following at the top of the | ||
relevant workflows, which will run `Renovate` on pull requests or branches. | ||
|
||
```yaml | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "renovate/**" | ||
pull_request: | ||
``` | ||
The following `GitHub` settings are required. | ||
|
||
- `Allow auto-merge` | ||
|
||
The following branch rules to the base branch are also recommended. | ||
|
||
- `Require status checks to pass before merging` ✅ | ||
- `Require branches to be up to date before merging` ✅ | ||
- List all status checks that should be mandatory here | ||
|
||
If the repository requires pull requests, then one must also configure the | ||
following. | ||
|
||
- `Allow specified actors to bypass required pull requests` ✅ | ||
- Add `renovate` here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
"schedule:weekdays", | ||
":automergeBranch", | ||
":automergeDigest", | ||
":automergeMinor", | ||
":automergePatch", | ||
":disableDependencyDashboard", | ||
":enablePreCommit" | ||
], | ||
"commitMessageAction": "Renovate:", | ||
"packageRules": [ | ||
{ | ||
"description": "Shorten commit titles", | ||
"commitMessageTopic": "{{depName}}", | ||
"matchManagers": ["bundler", "github-actions", "pre-commit"] | ||
} | ||
] | ||
} |