Skip to content

Commit abc93e6

Browse files
authored
сhore: update GH worklows + add various repo configs (#2)
* chore: adds our basic GHA configs * feat: adds CRabbit config * chore: trunk upgrade * chore: add GH repo configs
1 parent 83331e5 commit abc93e6

File tree

8 files changed

+178
-10
lines changed

8 files changed

+178
-10
lines changed

.coderabbit.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Docs: https://docs.coderabbit.ai/configure-coderabbit
2+
# Schema: https://coderabbit.ai/integrations/schema.v2.json
3+
# Support: https://discord.gg/GsXnASn26c
4+
5+
language: en
6+
7+
tone_instructions: |
8+
Provide feedback in a professional, friendly, constructive, and concise tone.
9+
Offer clear, specific suggestions and best practices to help enhance the code quality and promote learning.
10+
11+
early_access: true
12+
13+
knowledge_base:
14+
# The scope of learnings to use for the knowledge base.
15+
# `local` uses the repository's learnings,
16+
# `global` uses the organization's learnings,
17+
# `auto` uses repository's learnings for public repositories and organization's learnings for private repositories.
18+
# Default value: `auto`
19+
learnings:
20+
scope: global
21+
issues:
22+
scope: global
23+
pull_requests:
24+
scope: global
25+
26+
reviews:
27+
profile: chill
28+
auto_review:
29+
# Ignore reviewing if the title of the pull request contains any of these keywords (case-insensitive)
30+
ignore_title_keywords:
31+
- wip
32+
- draft
33+
- test
34+
# Set the commit status to 'pending' when the review is in progress and 'success' when it is complete.
35+
commit_status: false
36+
# Post review details on each review. Additionally, post a review status when a review is skipped in certain cases.
37+
review_status: false
38+
path_instructions:
39+
- path: "**/*.tf"
40+
instructions: |
41+
You're a Terraform expert who has thoroughly studied all the documentation from Hashicorp https://developer.hashicorp.com/terraform/docs and OpenTofu https://opentofu.org/docs/.
42+
You have a strong grasp of Terraform syntax and prioritize providing accurate and insightful code suggestions.
43+
As a fan of the Cloud Posse / SweetOps ecosystem, you incorporate many of their best practices https://docs.cloudposse.com/best-practices/terraform/ while balancing them with general Terraform guidelines.
44+
tools:
45+
# By default, all tools are enabled.
46+
# Masterpoint uses Trunk (https://trunk.io) so we do not need a lot of this feedback due to overlap.
47+
shellcheck:
48+
enabled: false
49+
ruff:
50+
enabled: false
51+
markdownlint:
52+
enabled: false
53+
github-checks:
54+
enabled: false
55+
languagetool:
56+
enabled: false
57+
biome:
58+
enabled: false
59+
hadolint:
60+
enabled: false
61+
swiftlint:
62+
enabled: false
63+
phpstan:
64+
enabled: false
65+
golangci-lint:
66+
enabled: false
67+
yamllint:
68+
enabled: false
69+
gitleaks:
70+
enabled: false
71+
checkov:
72+
enabled: false
73+
detekt:
74+
enabled: false
75+
eslint:
76+
enabled: false
77+
rubocop:
78+
enabled: false
79+
buf:
80+
enabled: false
81+
regal:
82+
enabled: false
83+
actionlint:
84+
enabled: false
85+
pmd:
86+
enabled: false
87+
cppcheck:
88+
enabled: false
89+
circleci:
90+
enabled: false

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Use this file to define individuals or teams that are responsible for code in a repository.
2+
# Read more: <https://help.github.com/articles/about-codeowners/>
3+
#
4+
# Order is important: the last matching pattern takes the most precedence
5+
6+
# These owners will be the default owners for everything
7+
* @masterpointio/masterpoint-internal

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## what
2+
3+
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
4+
- Use bullet points to be concise and to the point.
5+
6+
## why
7+
8+
- Provide the justifications for the changes (e.g. business case).
9+
- Describe why these changes were made (e.g. why do these commits fix the problem?)
10+
- Use bullet points to be concise and to the point.
11+
12+
## references
13+
14+
- Link to any supporting GitHub issues or helpful documentation to add some context (e.g. Stackoverflow).
15+
- Use `closes #123`, if this PR closes a GitHub issue `#123`
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f #v4.1.3
17+
with:
18+
release-type: terraform-module
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Trunk Upgrade
2+
3+
on:
4+
schedule:
5+
# On the first day of every month @ 8am
6+
- cron: 0 8 1 * *
7+
workflow_dispatch: {}
8+
9+
permissions: read-all
10+
11+
jobs:
12+
trunk-upgrade:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
# For trunk to create PRs
16+
contents: write
17+
pull-requests: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
21+
22+
- name: Create Token for MasterpointBot App
23+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
24+
id: generate-token
25+
with:
26+
app_id: ${{ secrets.MP_BOT_APP_ID }}
27+
private_key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}
28+
29+
- name: Upgrade
30+
uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 #v1.1.19
31+
with:
32+
github-token: ${{ steps.generate-token.outputs.token }}
33+
reviewers: "@masterpointio/masterpoint-internal"
34+
prefix: "chore: "

.trunk/configs/.markdownlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ line_length: false
88
spaces: false
99
url: false
1010
whitespace: false
11+
12+
# Ignore MD041/first-line-heading/first-line-h1
13+
# Error: First line in a file should be a top-level heading
14+
MD041: false

.trunk/trunk.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
33
version: 0.1
44
cli:
5-
version: 1.20.1
5+
version: 1.22.8
66
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
77
plugins:
88
sources:
99
- id: trunk
10-
ref: v1.4.4
10+
ref: v1.6.6
1111
uri: https://github.com/trunk-io/plugins
1212
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
1313
runtimes:
1414
enabled:
15-
- node@18.12.1
15+
- node@18.20.5
1616
1717
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
1818
lint:
1919
disabled:
2020
# Incompatible with some Terraform features: https://github.com/tenable/terrascan/issues/1331
2121
- terrascan
2222
enabled:
23-
- actionlint@1.6.27
23+
- actionlint@1.7.4
2424
25-
25+
2626
- git-diff-check
27-
- markdownlint@0.39.0
28-
- prettier@3.2.5
29-
- tflint@0.50.3
30-
- trivy@0.49.1
31-
- trufflehog@3.68.4
27+
- markdownlint@0.43.0
28+
- prettier@3.4.2
29+
- tflint@0.54.0
30+
- trivy@0.58.0
31+
- trufflehog@3.88.0
3232
3333
actions:
3434
enabled:

0 commit comments

Comments
 (0)