From cebe004f26f99ee8f082a5e20121cb55213efe77 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Mar 2024 16:36:40 +0100 Subject: [PATCH] Initial commit --- .commitlintrc.yaml | 0 .editorconfig | 17 +++++ .github/dependabot.yml | 8 +++ .github/workflows/add-to-project.yml | 16 +++++ .github/workflows/auto-merge.yml | 15 +++++ .github/workflows/follow-contributor.yml | 15 +++++ .github/workflows/lint.yml | 81 ++++++++++++++++++++++++ .gitignore | 1 + .markdownlint.yaml | 2 + .yamllint.yaml | 9 +++ LICENSE | 29 +++++++++ README.md | 15 +++++ 12 files changed, 208 insertions(+) create mode 100644 .commitlintrc.yaml create mode 100644 .editorconfig create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/add-to-project.yml create mode 100644 .github/workflows/auto-merge.yml create mode 100644 .github/workflows/follow-contributor.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .gitignore create mode 100644 .markdownlint.yaml create mode 100644 .yamllint.yaml create mode 100644 LICENSE create mode 100644 README.md diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml new file mode 100644 index 0000000..e69de29 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b0c0c1e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = lf +charset = utf-8 + +[*.md] +trim_trailing_whitespace = false +indent_size = 2 + +[*.{yml,yaml}] +trim_trailing_whitespace = false +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b95ae41 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + reviewers: + - "axone-protocol/maintainers" diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 0000000..ed648d0 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,16 @@ +name: Add to project + +on: + issues: + types: + - opened + +jobs: + add-to-project: + name: Add issue to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.6.0 + with: + project-url: https://github.com/orgs/axone-protocol/projects/2 + github-token: ${{ secrets.OPS_TOKEN }} diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..7dcf3a2 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,15 @@ +name: Auto merge + +on: + pull_request: + +jobs: + auto-merge-dependabot: + runs-on: ubuntu-22.04 + if: github.actor == 'dependabot[bot]' + steps: + - name: Auto merge PR + uses: ahmadnassri/action-dependabot-auto-merge@v2 + with: + target: minor + github-token: ${{ secrets.OPS_TOKEN }} diff --git a/.github/workflows/follow-contributor.yml b/.github/workflows/follow-contributor.yml new file mode 100644 index 0000000..8d22e28 --- /dev/null +++ b/.github/workflows/follow-contributor.yml @@ -0,0 +1,15 @@ +name: Follow contributor + +on: + pull_request: + branches: [main] + +jobs: + follow-user: + runs-on: ubuntu-22.04 + steps: + - name: Follow user + uses: okp4/follow-contributor-action@v1.1.0 + with: + username: ${{ github.event.pull_request.user.login }} + token: ${{ secrets.OPS_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..fb1e618 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,81 @@ +name: Lint + +on: + push: + branches: [ main ] + + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + lint-commits: + runs-on: ubuntu-22.04 + if: github.actor != 'dependabot[bot]' + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check commits + uses: wagoid/commitlint-github-action@v5 + + lint-markdown: + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Lint markdown files + uses: avto-dev/markdown-lint@v1.5.0 + with: + args: "**/*.md" + + lint-yaml: + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Lint yaml files + uses: ibiqlik/action-yamllint@v3.1.1 + + lint-branch-name: + runs-on: ubuntu-22.04 + if: github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') + steps: + - name: Check branch name conventions + uses: AlbertHernandez/branch-name-action@v1.0.2 + with: + branch_pattern: "feat|fix|build|ci|docs|style|refactor|perf|test|chore" + comment_for_invalid_branch_name: | + 🙋‍ Oops! This branch name does not follow the naming convention. + +
+ + Please, see the following branch naming convention: + + Branch naming convention | Purpose + ------------------------ | ------- + `feat/**` | A new feature + `fix/**` | A bug fix + `build/**` | Changes that affect the build system (npm, mavem, poetry) + `ci/**` | Changes to the CI configuration + `docs/**` | Documentation only changes + `style/**` | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) + `refactor/**` | Code changes that neither fixe a bug nor adds a feature + `perf/**` | Code changes that improve performance + `test/**` | When adding tests or correcting existing tests + `chore/**` | Other changes that don't modify source + fail_if_invalid_branch_name: "true" + ignore_branch_pattern: "main" + - name: Close non-compliant branch + if: ${{ failure() }} + uses: codelytv/no-pull-requests@v1 + with: + GITHUB_TOKEN: ${{ secrets.OPS_TOKEN }} + message: 🙅 Closing the PR because it does not respect naming conventions. Edit the branch name and submit a new PR. + env: + GITHUB_TOKEN: ${{ secrets.OPS_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..2620491 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,2 @@ +line-length: false +no-hard-tabs: false diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..e51d7a8 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,9 @@ +extends: default +rules: + document-start: disable + line-length: + max: 160 + level: warning + brackets: + min-spaces-inside: 0 + max-spaces-inside: 1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cafc1e9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2024, axone.xyz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..29a391a --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Template project + +> Template for [Axone](https://axone.xyz) opensource projects. + +[![lint](https://img.shields.io/github/actions/workflow/status/axone-protocol/template-oss/lint.yml?branch=main&label=lint&style=for-the-badge&logo=github)](https://github.com/axone-protocol/template-oss/actions/workflows/lint.yml) +[![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge&logo=conventionalcommits)](https://conventionalcommits.org) +[![contributor covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/axone-protocol/.github/blob/main/CODE_OF_CONDUCT.md) +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=for-the-badge)](https://opensource.org/licenses/BSD-3-Clause) + +## You want to get involved? 😍 + +Please check out Axone health files : + +- [Contributing](https://github.com/axone-protocol/.github/blob/main/CONTRIBUTING.md) +- [Code of conduct](https://github.com/axone-protocol/.github/blob/main/CODE_OF_CONDUCT.md)