Skip to content

Commit d1ec930

Browse files
authored
feat(gh): add default github repo files (#15)
1 parent 183b327 commit d1ec930

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# Users referenced in this file will automatically be requested as reviewers for
2-
# PRs that modify the given paths
3-
# See https://help.github.com/articles/about-code-owners/, https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
1+
# GitHub CODEOWNERS file
2+
# Documentation:
3+
# - https://help.github.com/articles/about-code-owners/
4+
# - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
45

5-
# All code
6+
# Syntax:
7+
# pattern @user-or-team
8+
# The last matching pattern takes precedence.
9+
10+
###############################
11+
# Repository Default Owners
12+
###############################
13+
# These owners will be the default owners for everything in the repo
614
* @ruzickap

.github/renovate.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
enabled: true,
2626
schedule: ["before 6am on Sunday"],
2727
},
28+
// Package update rules
2829
packageRules: [
2930
{
31+
description: "Disable auto-merge for major updates",
3032
matchUpdateTypes: ["major"],
3133
automerge: false,
3234
},
@@ -45,6 +47,7 @@
4547
],
4648
prBodyTemplate: "{{{table}}}{{{notes}}}{{{changelogs}}}",
4749
rebaseWhen: "behind-base-branch",
50+
// Custom version extraction
4851
regexManagers: [
4952
{
5053
extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?<version>.+)${{/if}}",

.github/workflows/mega-linter.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ jobs:
3030
- name: Extract commands from markdown files
3131
run: |
3232
set -euxo pipefail
33+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
34+
brew install mdq
3335
echo '#!/usr/bin/env bash' > README.sh
34-
find . -name '*.md' -print0 | while IFS= read -r -d '' FILE; do
35-
# Extract: ```bash ... ```
36-
sed -n "/^\`\`\`\(bash\|shell\)$/,/^\`\`\`$/p" "${FILE}" | sed '/^```*/d' >> README.sh
37-
# Extract: ```bash ... ```
38-
sed -n "/^ \`\`\`\(bash\|shell\)$/,/^ \`\`\`$/p" "${FILE}" | sed '/^ ```*/d; s/^ //' >> README.sh
39-
done
36+
readarray -d '' MD_FILES < <(find . -type f -name "*.md" -print0)
37+
mdq '```/^bash$|^shell$|^sh$/' --br -o plain "${MD_FILES[@]}" >> README.sh || true
4038
chmod a+x README.sh
4139
4240
- name: 💡 MegaLinter

.github/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}
6969

7070
- name: 💡 Self-hosted Renovate
71-
uses: renovatebot/github-action@02f4fdeb479bbb229caa7ad82cb5e691c07e80b3 # v41.0.14
71+
uses: renovatebot/github-action@19ba43e1bc58ed95c0ba205dee8b1bc0f27b630d # v42.0.0
7272
with:
7373
token: ${{ steps.app-token.outputs.token }}

.mega-linter.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ BASH_SHFMT_ARGUMENTS: --case-indent --indent 2 --space-redirects
88

99
DISABLE_LINTERS:
1010
- MARKDOWN_MARKDOWN_LINK_CHECK # Using lychee instead
11-
- REPOSITORY_DEVSKIM # Ignore duplicate code
1211
- SPELL_CSPELL
1312
- TERRAFORM_TERRASCAN # Hard to configure - no documentation of the config file
1413

@@ -21,6 +20,8 @@ FILTER_REGEX_EXCLUDE: CHANGELOG.md
2120

2221
FORMATTERS_DISABLE_ERRORS: false
2322

23+
JSON_JSONLINT_ARGUMENTS: --comments
24+
2425
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: .devcontainer/devcontainer.json
2526

2627
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.yml
@@ -42,6 +43,13 @@ REPOSITORY_KICS_ARGUMENTS: --fail-on high
4243

4344
REPOSITORY_TRIVY_ARGUMENTS: --severity HIGH,CRITICAL --ignore-unfixed
4445

46+
SPELL_LYCHEE_ARGUMENTS:
47+
- --accept
48+
- "429"
49+
50+
SPELL_LYCHEE_UNSECURED_ENV_VARIABLES:
51+
- GITHUB_TOKEN
52+
4553
TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES:
4654
- GITHUB_TOKEN
4755

0 commit comments

Comments
 (0)