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

feat(ci): Add a bunch of boilerplate automation goodies #540

Merged
merged 1 commit into from
Jan 18, 2025
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
1 change: 1 addition & 0 deletions .github/nextdoor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slackChannel: "#kingpin"
21 changes: 21 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name-template: v$RESOLVED_VERSION
tag-template: 'v$RESOLVED_VERSION'
tag-prefix: 'v'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
template: |
## Changes

$CHANGES
77 changes: 77 additions & 0 deletions .github/workflows/prlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: pull-request-lint
on:
pull_request:
types:
- edited
- labeled
- opened
- ready_for_review
- reopened
- synchronize
branches-ignore:
- production
jobs:
validate:
name: Validate PR title
runs-on:
- runs-on=${{ github.run_id }}
- runner=1cpu-linux-arm64
- extras=s3-cache
permissions:
contents: read
pull-requests: write
steps:
# Magic Cache
- uses: runs-on/action@v1

# Check out the repo so that we can dynamically discover the available charts in the repo.
- name: Checkout
uses: actions/checkout@v4
# Verify the PR title against the "types" and "scopes" we allow.
#
# https://github.com/amannn/action-semantic-pull-request#configuration
- uses: amannn/[email protected]
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
types: |
chore
docs
feat
fix
refactor
test
scopes: |
deps
docs
ci
actors
aws
s3
iam
cfn
cloudformation
group
macro
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

We have changed the repository requirements to now use [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.

Details:

```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
9 changes: 9 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: release-drafter
on:
push:
branches:
- main
jobs:
drafter:
uses: Nextdoor/.github/.github/workflows/release-drafter.yml@main
secrets: inherit
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://github.com/marketplace/actions/stale-branches
name: Stale Branches

on:
workflow_dispatch: {}
schedule:
- cron: '0 6 * * 1-5'

permissions:
issues: write
contents: write
pull-requests: write

jobs:
stale_branches:
runs-on: ubuntu-latest
steps:
- name: Stale Branches
uses: crs-k/[email protected]
with:
days-before-stale: 21
days-before-delete: 28
tag-committer: true
branches-filter-regex: '^((?!dependabot|production))'
28 changes: 28 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":prHourlyLimitNone",
":prConcurrentLimitNone",
":automergePr",
":automergePatch",
":automergeRequireAllStatusChecks"
],
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true,
"schedule": [
"before 5am on monday"
],
"packageRules": [
{
"matchUpdateTypes": [ "patch", "minor" ],
"automerge": true
},
{
"enabled": false,
"matchDatasources": [ "docker" ],
"matchPackageNames": [ "library/" ]
}
]
}
Loading