Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmab committed Nov 6, 2024
0 parents commit 87bf652
Show file tree
Hide file tree
Showing 35 changed files with 43,876 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf

dist/** -diff linguist-generated=true
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
reviewers:
- "mention-me/partnerships"

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
reviewers:
- "mention-me/partnerships"
48 changes: 48 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "Story"
- title: "🐛 Bug Fixes"
labels:
- "defect"
- "bug"
- title: "🧰 Maintenance"
labels:
- "dependencies"
- "Task"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
autolabeler:
- label: "chore"
branch:
- '/chore\/.+/'
- label: "bug"
branch:
- '/bug\/.+/'
- label: "feature"
branch:
- '/feature\/.+/'
version-resolver:
# We're using the "bump-*" labelling for PRs, as Dependabot uses "major", "minor" and "patch" labels (when
# they exist in the repository) to denote a major/minor/patch bump in a dependency. And, generally speaking,
# just because dependencies are major bump, does not mean our release notes NEED to be major releases.
# See here: https://github.com/dependabot/dependabot-core/issues/2455
major:
labels:
- "bump-major"
minor:
labels:
- "bump-minor"
patch:
labels:
- "bump-patch"
default: patch
exclude-labels:
# In case we ever want to keep the release notes tidy from small PR changes
- "skip-changelog"
template: |
## What's Changed
$CHANGES
67 changes: 67 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# In TypeScript actions, `dist/` is a special directory. When you reference
# an action with the `uses:` property, `dist/index.js` is the code that will be
# run. For this project, the `dist/index.js` file is transpiled from other
# source files. This workflow ensures the `dist/` directory contains the
# expected transpiled code.
#
# If this workflow is run from a feature branch, it will act as an additional CI
# check and fail if the checked-in `dist/` directory does not match what is
# expected from the build.
name: Check Transpiled JavaScript

on:
pull_request:

push:
branches:
- main

permissions:
contents: read

jobs:
check-dist:
name: Check dist/
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build dist/ Directory
run: npm run bundle

# This will fail the workflow if the `dist/` directory is different than
# expected.
- name: Compare Directories
id: diff
run: |
if [ ! -d dist/ ]; then
echo "Expected dist/ directory does not exist. See status below:"
ls -la ./
exit 1
fi
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
# If `dist/` was different than expected, upload the expected version as a
# workflow artifact.
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
name: Upload Artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Continuous Integration

on:
pull_request:

push:
branches:
- main

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: Check Formatting
run: npm run format:check

- name: Lint
run: npm run lint:static-analysis

- name: Check Types
run: npm run lint:types

- name: Test
run: npm run test
58 changes: 58 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]

permissions:
contents: read

jobs:
update_release:
name: Prepare
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check_labels:
name: Validate Labels
runs-on: ubuntu-latest
needs: update_release
if: ${{ github.event_name == 'pull_request' }}
permissions:
issues: write
pull-requests: write

steps:
- uses: mheap/github-action-required-labels@v5
if: ${{ always() }}
with:
mode: exactly
count: 1
labels: "bump-patch, bump-minor, bump-major, skip-changelog"
add_comment: true
message: |
This PR needs **{{ errorString }}** one label added to indicate whether it is a major, minor, or patch change.
The available labels are: `bump-patch`, `bump-minor`, `bump-major` and `skip-changelog`.
- uses: mheap/github-action-required-labels@v5
if: ${{ always() }}
with:
mode: exactly
count: 1
labels: "feature, chore, bug"
add_comment: true
message: |
This PR needs **{{ errorString }}** one label added to indicate whether it is a feature, bug, or chore.
The available labels are: `feature`, `chore`, `bug`.
103 changes: 103 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Dependency directory
node_modules

# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
__tests__/runner/*

# IDE files
.idea
.vscode
*.code-workspace
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @mention-me/partnerships
Loading

0 comments on commit 87bf652

Please sign in to comment.