Skip to content

Commit

Permalink
✨ feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wanjohiryan committed Mar 29, 2024
0 parents commit 601c268
Show file tree
Hide file tree
Showing 10 changed files with 1,077 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @wanjohiryan
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
labels:
- 'type/build'
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
105 changes: 105 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
version: 2
labels:
- label: 'type/chore'
branch: '^chore/.*'
title: '^\s*.*?\schore(?:(.+))?!?:'

- label: 'type/fix'
branch: '^fix/.*'
title: '^\s*.*?\sfix(?:(.+))?!?:'

- label: 'type/feat'
branch: '^feat/.*'
title: '^\s*.*?\sfeat(?:(.+))?!?:'

- label: 'type/breaking'
body: '(?i)breaking.*'

- label: 'type/docs'
title: '^\s*.*?\sdocs(?:(.+))?!?:'
files:
- '**/*.md$'
- '**/*.mdx$'

- label: 'type/ci'
branch: '^ci/.*'
title: '^\s*.*?\sci(?:(.+))?!?:'
files:
- '.github/.+'

- label: 'type/build'
branch: '^dependabot/.*'
title: '^\s*.*?\sbuild(?:(.+))?!?:'

- label: 'type/perf'
title: '^\s*.*?\sperf(?:(.+))?!?:'

- label: 'mergeable/false'
mergeable: False

- label: 'usr/dependabot'
branch: '^dependabot/.*'
authors:
- 'dependabot[bot]'

- label: 'scope/back-end'
files:
- 'server.Dockerfile'

- label: 'scope/relay'
files:
- 'relay.Dockerfile'

- label: 'scope/front-end'
files:
- 'apps/www/.+'

- label: 'pkg/www'
files:
- 'apps/www/.+'

- label: 'scope/git'
files:
- '**/.gitignore$'
- '.github/.+'

- label: "size/xs"
size:
below: 10
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "size/s"
size:
above: 9
below: 100
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "size/m"
size:
above: 49
below: 200
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "size/l"
size:
above: 199
below: 500
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "size/xl"
size:
above: 499
below: 1000
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "size/xxl"
size:
above: 999
exclude-files: ["pnpm-lock.yml","yarn.lock"]

- label: "usr/wanjohi"
authors: ['wanjohiryan']

- label: "usr/unknown"
negate: True
authors: ['wanjohiryan','apps/dependabot','dependabot', 'dependabot[bot]']
105 changes: 105 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Default labels
- name: "type/fix"
color: "B60205"

- name: "type/build"
color: "6C55D7"

- name: "type/feat"
color: "0ADE12"

- name: "type/docs"
color: "891059"

- name: "type/refactor"
color: "8D44DF"

- name: "type/revert"
color: "5319e7"

- name: "type/style"
color: "D71964"

- name: "type/test"
color: "0B9EE8"

- name: "type/breaking"
color: "0590CC"

- name: "type/chore"
color: "B44A63"

- name: "type/ci"
color: "4FE1A6"

- name: "type/perf"
color: "4FE1A6"

- name: "mergeable/false"
color: "B60205"

- name: "priority/high"
color: "D4E734"

- name: "priority/mid"
color: "D4E734"

- name: "priority/low"
color: "D4E734"

- name: "reg/docker"
color: "5319e7"

- name: "reg/npm"
color: "5319e7"

- name: "pkg/www"
color: "5319e7"

- name: "pkg/lib"
color: "5319e7"

- name: "pkg/aws"
color: "5319e7"

- name: "scope/git"
color: "B61B66"

- name: "scope/infra"
color: "B61B66"

- name: "scope/front-end"
color: "B61B66"

- name: "scope/relay"
color: "B61B66"

- name: "scope/back-end"
color: "B61B66"

- name: "size/xs"
color: "AD4322"

- name: "size/s"
color: "AD4322"

- name: "size/m"
color: "AD4322"

- name: "size/l"
color: "AD4322"

- name: "size/xl"
color: "AD4322"

- name: "size/xxl"
color: "AD4322"

- name: "usr/wanjohi"
color: "09469C"

- name: "usr/dependabot"
color: "09469C"

- name: "usr/unknown"
color: "09469C"
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Description

**What(what issue does this code solve/what feature does it add):**

**How(how does it solve it):**

## Required Checklist:

- [ ] I have added any necessary documentation and comments in my code (where appropriate)
- [ ] I have added tests to make sure my code runs in all contexts

## Further comments
45 changes: 45 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: '⚠ Breaking Changes'
label: 'type/breaking'
- title: '🚀 New Features'
label: 'type/feat'
- title: '🐜 Bug Fixes'
label: 'type/fix'
- title: '🧰 Maintenance'
label: 'type/chore'
- title: '📖 Documentation'
label: 'type/docs'
- title: '⬆ Version Upgrades'
label: 'type/build'
collapse-after: 10
- title: 'Other changes'
collapse-after: 10

version-resolver:
major:
labels:
- 'type/breaking'
minor:
labels:
- 'type/feat'
patch:
labels:
- 'type/fix'
- 'type/build'
- 'type/docs'
- 'type/chore'
- 'type/refactor'
- 'type/ci'
- 'type/style'
- 'type/test'

exclude-labels:
- 'skip-changelog'
88 changes: 88 additions & 0 deletions .github/workflows/autolabeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Pull request auto-labeller

on:
pull_request:
types:
- labeled
- opened
- synchronize
- reopened
- ready_for_review
- edited

jobs:
validate:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GIT_MASTER_TOKEN }}
with:
#TODO: fix all emojis
types: |-
✨ feat
🐛 fix
🔨 chore
📝 docs
✅ test
🕵🏽‍♂️ security
🚮 remove
♻️ revert
🏎️ perf
💫 style
deprecate
refactor
ci
build
requireScope: false
# Ensures the subject start with an uppercase character.
subjectPattern: ^([A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
starts with an uppercase character
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
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 require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Additionally, the subject of the title must start with an uppercase character (e.g. feat: New `search` component).
```
${{ 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@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: pr-title-lint-error
delete: true

label:
needs: [ validate ]
runs-on: ubuntu-latest
name: Add labels
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout your code
uses: actions/checkout@v4

- uses: srvaroa/labeler@v1
with:
config_path: .github/labeler.yml
use_local_config: true #FIXME:
fail_on_error: true
env:
GITHUB_TOKEN: "${{ secrets.GIT_MASTER_TOKEN }}"
Loading

0 comments on commit 601c268

Please sign in to comment.