From 45f63de2f9152716204b608c741c8d705a799c2e Mon Sep 17 00:00:00 2001 From: Arnaud Mimart <33665250+amimart@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:26:50 +0200 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..0612db8 --- /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@v1.0.2 + 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..74f8396 --- /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@v6 + + 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. + +