diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..753d3aec --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ + + +#### What this PR does / why we need it: + +#### Which issue(s) does this PR fixes?: + + + +Fixes # + +#### Additional comments?: + +#### Developer Checklist: + + + +- [ ] Read your code changes at least once +- [ ] No console errors +- [ ] Unit tests\* +- [ ] Added e2e tests\* + + diff --git a/.github/oss-governance-bot.yml b/.github/oss-governance-bot.yml new file mode 100644 index 00000000..5e4f884b --- /dev/null +++ b/.github/oss-governance-bot.yml @@ -0,0 +1,22 @@ +name: OSS Governance + +on: + pull_request_target: + types: [synchronize, opened, labeled, unlabeled] + issues: + types: [opened, labeled, unlabeled] + issue_comment: + types: [created] + +permissions: + contents: read + issues: write + pull-requests: write + statuses: write + checks: write + +jobs: + Bot: + runs-on: ubuntu-latest + steps: + - uses: BirthdayResearch/oss-governance-bot@37c8583c6b8596d173b68ffaed543e2485f4f193 # v3.0.0 diff --git a/.github/oss-governance-labeler.yml b/.github/oss-governance-labeler.yml new file mode 100644 index 00000000..d92bc689 --- /dev/null +++ b/.github/oss-governance-labeler.yml @@ -0,0 +1,20 @@ +name: OSS Governance + +on: + pull_request_target: + types: [opened, edited, synchronize] + +permissions: + contents: read + issues: write + pull-requests: write + statuses: write + checks: write + +jobs: + Labeler: + runs-on: ubuntu-latest + steps: + - uses: fuxingloh/multi-labeler@6704db0bcba106d07482efabbc79d3092af74fa2 # v2.0.3 + with: + config-path: .github/labeler.yml diff --git a/.github/oss-governance-labels.yml b/.github/oss-governance-labels.yml new file mode 100644 index 00000000..02cf9c75 --- /dev/null +++ b/.github/oss-governance-labels.yml @@ -0,0 +1,22 @@ +name: OSS Governance + +on: + push: + branches: [main] + paths: [.github/labels.yml] + +permissions: + contents: read + issues: write + +jobs: + Labels: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # tag=v1.3.0 + with: + prune: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..74daac24 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,28 @@ +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +categories: + - title: "๐Ÿš€ Features" + labels: + - "kind/feature" + - title: "๐Ÿ› Bug Fixes" + labels: + - "kind/fix" + - title: "Maintenance" + labels: + - "kind/refactor" + - "kind/chore" + - "kind/docs" + - title: "Dependencies" + labels: + - "kind/dependencies" +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +change-title-escapes: '\<*_&' +version-resolver: + minor: + labels: + - "kind/feature" + default: patch +template: | + ## Whatโ€™s Changed + + $CHANGES diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..936739bf --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,3 @@ +{ + "extends": ["github>waveshq/standard//renovate-config/web"] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7368981b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflows }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint - Typescript and ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - run: corepack enable pnpm + - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + with: + node-version-file: ".nvmrc" + cache: "pnpm" + + - run: pnpm install --frozen-lockfile + - run: pnpm lint + + build: + name: "Build (Apps & Packages)" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - run: corepack enable pnpm + - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + with: + node-version-file: ".nvmrc" + cache: pnpm + + - run: pnpm install --frozen-lockfile + - run: pnpm build \ No newline at end of file diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml new file mode 100644 index 00000000..2e28734d --- /dev/null +++ b/.github/workflows/governance.yml @@ -0,0 +1,126 @@ +version: v1 + +issue: + labels: + - prefix: triage + list: ["accepted"] + multiple: false + author_association: + collaborator: true + member: true + owner: true + needs: + comment: | + @$AUTHOR: Thanks for opening an issue, it is currently awaiting triage. + + The triage/accepted label can be added by foundation members by writing /triage accepted in a comment. + + - prefix: kind + list: + - feature + - bug + - question + - fix + - chore + - docs + - refactor + - dependencies + multiple: false + needs: true + author_association: + author: true + collaborator: true + member: true + owner: true + + - prefix: area + list: + - core + - workflow + - docs + multiple: true + needs: + comment: | + @$AUTHOR: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. **If you are unsure what to do you can ignore this!** + + You can add area labels by leaving a `/area` comment. + author_association: + author: true + collaborator: true + member: true + owner: true + + - prefix: priority + multiple: true + list: ["urgent-now", "important-soon", "low"] + needs: + comment: | + @$AUTHOR: Thanks for opening an issue, an appropriate priority will be added soon. + + The priority labels can be added by foundation members by writing /priority [type] in a comment. + author_association: + collaborator: true + member: true + owner: true + + chat_ops: + - cmd: /close + type: close + author_association: + author: true + collaborator: true + member: true + owner: true + + - cmd: /duplicate + type: close + author_association: + collaborator: true + member: true + owner: true + + - cmd: /duplicate + type: comment + comment: | + @$ISSUE_AUTHOR: This issue has been marked duplicate by @$AUTHOR, if you think this is a mistake, please reopen it! + author_association: + collaborator: true + member: true + owner: true + + - cmd: /duplicate + type: label + label: + add: duplicate + author_association: + collaborator: true + member: true + owner: true + + - cmd: /cc + type: none + + - cmd: /assign + type: assign + author_association: + collaborator: true + member: true + owner: true + + captures: + - regex: '\W*v?(\d+\.\d+\.\d+)\W*' + github_release: true + ignore_case: true + label: "version/$CAPTURED" + + - regex: '\W*Mac\W*' + label: "platform/mac" + ignore_case: true + + - regex: '\W*Windows\W*' + label: "platform/windows" + ignore_case: true + + - regex: '\W*Linux\W*' + label: "platform/linux" + ignore_case: true diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..1f960930 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,57 @@ +version: v1 + +labels: + - label: kind/feature + sync: true + matcher: + title: "^feature\\(.+\\): .+" + + - label: kind/feature + sync: true + matcher: + title: "^feat\\(.+\\): .+" + + - label: kind/fix + sync: true + matcher: + title: "^fix\\(.+\\): .+" + + - label: kind/chore + sync: true + matcher: + title: "^chore\\(.+\\): .+" + + - label: kind/refactor + sync: true + matcher: + title: "^refactor\\(.+\\): .+" + + - label: kind/docs + sync: true + matcher: + title: "^docs\\(.+\\): .+" + + - label: kind/dependencies + sync: true + matcher: + title: "^bump(\\(.+\\))?: .+" + + - label: kind/dependencies + sync: true + matcher: + title: "^build(\\(.+\\))?: .+" + +checks: + - context: "Semantic Pull Request" + url: "https://github.com/JellyfishSDK/jellyfish/blob/main/.github/labeler.yml" + description: + success: Ready for review & merge. + failure: "Missing semantic title or label for merge [kind(directory): title]" + labels: + any: + - kind/feature + - kind/fix + - kind/chore + - kind/refactor + - kind/docs + - kind/dependencies diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 00000000..3e6e5621 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,114 @@ +# GitHub generic useful labels +- color: c4d471 + name: duplicate + description: This issue or pull request already exists +- color: 7057ff + name: good first issue + description: Good for newcomers +- color: ffffff + name: wontfix + description: This will not be worked on +- color: 000000 + name: stale + description: No activity for a significant amount of days + +# Needs +- color: cc40d8 + name: needs/kind + description: Needs kind label +- color: cc40d8 + name: needs/area + description: Needs area label(s) +- color: cc40d8 + name: needs/priority + description: Needs a priority label +- color: cc40d8 + name: needs/triage + description: Waiting for triage to be accepted +- color: cc40d8 + name: needs/design + description: Waiting for designs + +# Kind +- color: e7e9eb + name: kind/bug + description: Something isn't working +- color: e7e9eb + name: kind/feature + description: New feature request +- color: e7e9eb + name: kind/question + description: Generic question +- color: e7e9eb + name: kind/chore + description: Non feature change +- color: e7e9eb + name: kind/fix + description: Fix a bug +- color: e7e9eb + name: kind/docs + description: Non feature documentation change +- color: e7e9eb + name: kind/refactor + description: Non feature refactor change +- color: e7e9eb + name: kind/dependencies + description: Pull requests that update a dependency file + +# Area - Directory +- color: fbca04 + name: area/core +- color: fbca04 + name: area/workflow +- color: fbca04 + name: area/docs + +# Priority +- color: da0b0b + name: priority/urgent-now + description: Urgent fix, as fast as possible +- color: daaa0b + name: priority/important-soon + description: Will be important soon +- color: dad30b + name: priority/low + description: Least priority + +# Triage +- color: b1f488 + name: triage/accepted + description: Triage has been accepted + +# Bug +- color: ffb638 + name: bug/minor + description: Minor issue which is non-breaking and has a workaround +- color: ff7a38 + name: bug/major + description: Major issue which is non-breaking but no workaround +- color: ff3a3a + name: bug/critical + description: Critical issue that affects core functionalities. Needs to be hotfix + +# Time Estimate +- color: 0bdacc + name: T3d + description: Time Estimate 3 days +- color: 0bdacc + name: T1d + description: Time Estimate 1 day +- color: 0bdacc + name: T1h + description: Time Estimate 1 hour +- color: 0bdacc + name: T2h + description: Time Estimate 2 hours +- color: 0bdacc + name: T4h + description: Time Estimate 4 hours +- color: 0bdacc + name: T25m + description: Time Estimate 25 minutes +- color: 0bdacc + name: T5m + description: Time Estimate 5 minutes or less diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 90f42a67..c5b29737 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,9 +12,7 @@ jobs: steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd - with: - version: 8 + - run: corepack enable pnpm - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c with: @@ -32,7 +30,7 @@ jobs: throw new Error('not semver') result-encoding: string - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm build - name: Version diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..bbb04fa8 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,22 @@ +name: Release Drafter + +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + main: + name: Draft Release + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.24.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}