Skip to content

Commit

Permalink
feat: Add initial configuration files
Browse files Browse the repository at this point in the history
- Add .node-version file with Node.js version 20.14.0
- Add .gitignore file with ignored files and directories
- Add .github/CODEOWNERS file with code owners configuration
- Add .editorconfig file with editor configuration
- Add pnpm-workspace.yaml file with package configuration
- Add .prototools file with plugin and version configuration
- Add .vscode/extensions.json file with recommended VS Code extensions
- Add .github/ISSUE_TEMPLATE/config.yml file with issue template configuration
- Add .changeset/config.json file with changeset configuration
- Add .vscode/settings.json file with VS Code settings
- Add .github/actions/install/action.yml file with install action configuration
- Add .github/ISSUE_TEMPLATE/99-new-chore.md file with new chore issue template
- Add .github/PULL_REQUEST_TEMPLATE.md file with pull request template
- Add package.json file with project dependencies and scripts
- Add .github/ISSUE_TEMPLATE/2-feature-request.yml file with feature request issue template
- Add biome.json file with Biome configuration
- Add .github/workflows/ci-push-main.yml file with CI workflow configuration
- Add .github/ISSUE_TEMPLATE/1-bug-report.yml file with bug report issue template
  • Loading branch information
Adammatthiesen committed Dec 5, 2024
1 parent 2909bc0 commit 5c4448a
Show file tree
Hide file tree
Showing 21 changed files with 1,808 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changeset /config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "../node_modules/@changesets/config/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "withstudiocms/project-template" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["playground"]
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @withstudiocms/exalted

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: package
attributes:
label: Package
description: Which package is the bug report for?
options:
- '@studiocms/package'
default: 0
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version are you running?
placeholder: 0.1.0
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature Request
description: Suggest an idea/feature for StudioCMS
title: '[Feature Request]: '
labels:
- feat
body:
- type: markdown
attributes:
value: |
Thanks for proposing a new feature for StudioCMS!
- type: textarea
id: idea
attributes:
label: Describe your feature request
description: Try to give as much detail as possible.
placeholder: Tell us what you want!
validations:
required: true
- type: textarea
id: examples
attributes:
label: Other examples?
description: Has there been something similar made elsewhere?
placeholder: If not just respond no
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the plugin request here.
validations:
required: false
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/99-new-chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: New Chore
about: Used to create a new Chore for a needed task
title: "Chore: [NAME]"
labels: chore
---

**Is your chore related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: 💁 Support
url: https://chat.studiocms.dev
about: 'This issue tracker is not for support questions. Join us on Discord for assistance!'
- name: 👾 Chat
url: https://chat.studiocms.dev
about: Our Discord server is active, come join us!
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 @@
<!-- Thank you for opening a PR! We really appreciate you taking the time to help out 🙌 -->

#### Description

- Closes # <!-- If applicable add an issue number to this PR so it can be closed otherwise feel free to remove this. -->
- What does this PR change? Give us a brief description.

<!--
Here’s what will happen next:
One of our maintainers will review your pull request as soon as possible. We strive to provide feedback within a day, but please understand that responses may occasionally take longer depending on the circumstance and our availability. If we request any changes, please feel free to ask for clarification or provide additional context. We appreciate your patience and contribution to the project.
-->
18 changes: 18 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Install Tools & Dependencies
description: Installs pnpm, Node.js & package dependencies

runs:
using: composite
steps:
- name: Setup pnpm (corepack enabled)
uses: pnpm/action-setup@v3

- name: Setup Node.js 20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm ci:install
shell: bash
54 changes: 54 additions & 0 deletions .github/workflows/ci-delabeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Remove labels from merged PRs and issues

on:
pull_request_target:
types:
- closed
issues:
types:
- closed

permissions:
pull-requests: write
issues: write

jobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
awaiting review(s)
awaiting review
in progress
question
help wanted
remove-closed-pr-labels:
name: Remove closed pull request labels
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
in discussion
help wanted
remove-closed-issue-labels:
name: Remove closed issue labels
if: github.event.issue.state == 'closed'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
in discussion
in progress
help wanted
60 changes: 60 additions & 0 deletions .github/workflows/ci-first-contributor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI - First Time Contributor

on:
issues:
types: [opened]
pull_request_target:
types: [opened, closed]

jobs:
check_for_first_interaction:
name: Check for First Interaction
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: First Interaction Check
uses: zephyrproject-rtos/action-first-interaction@7e6446f8439d8b4399169880c36a3a12b5747699
with:
repo-token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
issue-message: >
Hi @${{ github.event.issue.user.login }} 👋
Welcome to the StudioCMS project! We're excited to have you here. Thanks for opening your first issue! 🎉
If you are reporting a bug, please make sure to include the following information in your issue:
- A clear description of the issue
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (OS, hardware, etc.)
If you have any questions or need help, feel free to ask. We're here to help you! 🚀
If you're interested in contributing to the project, please check out our [Contributing Guide](https://github.com/withstudiocms/.github/blob/main/CONTRIBUTING.md) and join our [Discord community](https://chat.studiocms.dev) to stay in the loop for any future help we may need!
Thanks again for opening your first issue! 🙌
- The StudioCMS Team
pr-opened-message: >
Hello @${{ github.event.pull_request.user.login }}, and thank you for opening your first pull request to StudioCMS! 🎉
Please make sure to review the project's [Contributing Guide](https://github.com/withstudiocms/.github/blob/main/CONTRIBUTING.md) to ensure your pull request meets our quality standards.
We're excited to have you here and appreciate your contribution. If you have not already, please make sure to include the following information in your pull request:
- A clear description of the changes
- Steps to reproduce the issue (if applicable)
- Any relevant screenshots or logs
Our team will review your pull request as soon as possible. If you have any questions or need help, feel free to ask. We're here to help you! 🚀
In the meantime, you will notice that a few checks will run on your pull request. These checks are automated and help us ensure that your changes meet our quality standards. If you see any errors or warnings, don't worry! Our team will help you address them. 😊
pr-merged-message: >
**Congrats and Welcome** @${{ github.event.pull_request.user.login }} to the Contributor Squad! 🎉
If you haven't already, please join our [Discord community](https://chat.studiocms.dev) to stay in the loop for any future help we may need!
- The StudioCMS Team
43 changes: 43 additions & 0 deletions .github/workflows/ci-push-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI - Push to main

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: write

jobs:
format:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Check out code using Git
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}

- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Format code
run: pnpm run lint:fix

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5
with:
commit_message: '[ci] lint'
branch: ${{ github.head_ref }}
commit_user_name: studiocms-no-reply
commit_user_email: [email protected]
commit_author: StudioCMS <[email protected]>

mergebot:
if: ${{ github.repository_owner == 'withstudiocms' && github.event_name == 'push' && github.event.commits[0].message != '[ci] lint' }}
uses: withstudiocms/automations/.github/workflows/mergebot.yml@main
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_MERGEBOT }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules

.npmrc

dist/
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.14.0
6 changes: 6 additions & 0 deletions .prototools
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
biome = "1.9.2"
node = "20.14.0"
pnpm = "9.5.0"

[plugins]
biome = "source:https://raw.githubusercontent.com/Phault/proto-toml-plugins/main/biome/plugin.toml"
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "biomejs.biome", "streetsidesoftware.code-spell-checker"],
"unwantedRecommendations": []
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome",
"editor.gotoLocation.multipleDefinitions": "goto",
"cSpell.words": [
"studiocms",
"withstudiocms"
]
}
Loading

0 comments on commit 5c4448a

Please sign in to comment.