Skip to content

Commit

Permalink
feat: base move to use issue forms (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkflame72 authored Dec 11, 2024
1 parent 87a9332 commit c1879f7
Show file tree
Hide file tree
Showing 28 changed files with 3,129 additions and 213 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = false

[{.*,*.md,*.mdx,*.json,*.toml,*.yml,}]
indent_style = space
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
.github
.changeset
79 changes: 79 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
module.exports = {
env: {
node: true,
es2022: true,
browser: true,
},
extends: ['eslint:recommended', 'plugin:astro/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'no-mixed-spaces-and-tabs': 'off',
},
settings: {
react: {
pragma: 'h',
version: '16.0',
},
},
overrides: [
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro'],
},
rules: {},
},
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/triple-slash-reference': 'off',
},
},
{
files: ['*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['react', '@typescript-eslint'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
// Define the configuration for `<script>` tag.
// Script in `<script>` is assigned a virtual file name with the `.js` extension.
files: ['**/*.astro/*.js', '*.astro/*.js'],
parser: '@typescript-eslint/parser',
},
],
};
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Tūhura Tech Discord
url: https://discord.gg/PNxh7cwKfQ
about: Please ask and answer questions here.
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/new_topic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Request a new topic
description: Request a new topic to be added to the Wiki
title: "[Topic Request]: "
labels: ["new-topic"]
projects: ["Tuhura-Tech/2"]
body:
- type: markdown
attributes:
value: |
Thanks for requesting a new topic to be added to the wiki!
- type: textarea
id: description
attributes:
label: What is the topic?
description: Please describe the topic that you believe should be added along with any information around it. This should include the technology used, how it could tie into other resources (if applicable) and what you think it should cover.
placeholder: Really interesting topic that should be added.
value: "Topic information!"
validations:
required: true
- type: dropdown
id: category
attributes:
label: What category would the topic best fit under?
multiple: false
options:
- Python
- JS/TS
- Game Development
- Cyber Security
- Electronics
- Design/Modelling
- NCEA resources
- Other
validations:
required: true
- type: dropdown
id: diataxis
attributes:
label: What [Diataxis](https://diataxis.fr/) category would the topic best fit under?
multiple: false
options:
- Tutorial
- How to guide
- Explanation
- Reference
validations:
required: true
- type: checkboxes
id: assist
attributes:
label: Would you be willing to contribute to or help review this resource?
description: Will you be able to give some of your time to either help build or at least review the completed resource?
options:
- label: I agree to help with this resource
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Tuhura-Tech/wiki/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/topic_issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Request an issue with a topic
description: Request a new topic to be added to the Wiki
title: "[Issue]: "
labels: ["topic-issue"]
projects: ["Tuhura-Tech/2"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting an issue with a resource!
- type: textarea
id: description
attributes:
label: What is wrong with this resource?
description: Please describe the the issue with this resource, this could be incorrect information, out of date details or any other issues.
placeholder: X and Y are wrong with this resources because...
validations:
required: true
- type: input
id: category
attributes:
label: What is the url to the page?
description: Please provide the url to the page with the issue.
placeholder: https://wiki.tuhuratech.org.nz/
value: https://wiki.tuhuratech.org.nz/
render: shell
required: true
- type: checkboxes
id: assist
attributes:
label: Would you be willing to contribute to or help review this resource?
description: Will you be able to give some of your time to either help fix or at least review the fixed resource?
options:
- label: I agree to help with this resource
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Tuhura-Tech/wiki/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Thank you for opening a PR! We really appreciate you taking the time to help out 🙌 -->

#### Description (required)

<!-- Please describe the change you are proposing, and why -->

#### Related issues & labels (optional)

- Closes #<!-- Add an issue number if this PR will close it. -->
- Suggested label: <!-- Help us triage by suggesting one of our labels that describes your PR -->

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
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
shell: bash
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [main]
merge_group:
pull_request:

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
astrocheck:
name: Check for type issues with astro check
runs-on: ubuntu-latest
env:
FORCE_COLOR: true
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Run Check
run: pnpm run check
eslint:
name: Check for code issues with ESLint
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Run Check
run: pnpm run lint:eslint
28 changes: 28 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Format Code'

on:
push:
branches:
- main

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Format code
run: pnpm run format:ci
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[ci] format'
branch: ${{ github.head_ref }}
commit_user_name: bot
commit_user_email: [email protected]
17 changes: 17 additions & 0 deletions .github/workflows/pr-coauthor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Write coauthors to a pull request
permissions:
pull-requests: write

on:
issue_comment:
types:
- created

jobs:
generate-coauthors:
name: Generate Coauthor
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: kevinzunigacuellar/[email protected]
Loading

0 comments on commit c1879f7

Please sign in to comment.