Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: basic repository setup #6

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true

# Markdown files are checked using markdownlint
[*.md]
indent_size = unset
max_line_length = unset
trim_trailing_whitespace = unset

[{*.yml,*.yaml,*.toml}]
indent_size = 2
max_line_length = 150

# Ignore paths
[{.git/**/*,LICENSE}]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
max_line_length = unset
trim_trailing_whitespace = unset
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "chore"
include: "scope"
groups:
github-actions-all:
patterns: ["*"]
59 changes: 59 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Lint

on: [pull_request]

permissions:
contents: read

jobs:
pr-title:
runs-on: ubuntu-latest
name: Check PR title format
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check PR title
uses: amannn/action-semantic-pull-request@v5.5.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

editorconfig:
runs-on: ubuntu-latest
name: Check editorconfig
steps:
- uses: actions/checkout@v4
- run: pip install editorconfig-checker=="2.7.3"
- run: ec

markdownlint:
runs-on: ubuntu-latest
name: Lint all markdown files
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v16.0.0

typos:
runs-on: ubuntu-latest
name: Check spelling
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.21.0

check-all:
name: Check if all lint jobs succeeded
if: always()
needs:
- pr-title
- editorconfig
- typos
- markdownlint
runs-on: ubuntu-latest
steps:
- name: Decide whether all needed jobs succeeded
uses: re-actors/alls-green@v1.2.2
with:
jobs: ${{ toJSON(needs) }}
46 changes: 46 additions & 0 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Updates

on:
# every month
schedule:
- cron: '14 3 1 * *'
# on demand
workflow_dispatch:

jobs:
pre-commit:
name: "Update pre-commit hooks and run them on all files"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install pre-commit
- run: pre-commit autoupdate
- run: pre-commit run --all-files

- uses: peter-evans/create-pull-request@v6.0.5
if: ${{ success() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore/update-pre-commit-hooks
title: "chore: update pre-commit hooks"
commit-message: "chore: update pre-commit hooks"
body: Update pre-commit hooks to latest version.
- uses: peter-evans/create-pull-request@v6.0.5
if: ${{ failure() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore/update-pre-commit-hooks
title: "chore: update pre-commit hooks"
commit-message: "chore: update pre-commit hooks"
body: |
Update pre-commit hooks to latest version.

**Warning**: Some checks did not succeed. Please check the [action output][run] before merging this PR.

[run]: https://github.com/MystenLabs/walrus/actions/runs/${{ github.run_id }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Editors/OS
**/.history/
**/.vscode/
**/.vscode/**
**/.idea/
.nvimrc
.DS_Store
!.vscode/extensions.json

# Custom pre-commit configuration
.custom-pre-commit-config.yaml
Expand Down
17 changes: 17 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
globs:
- "**/*.md"
gitignore: true
config:
default: true
line-length:
line_length: 100
heading_line_length: 80
code_block_line_length: 150
tables: false
stern: true
heading-style:
style: atx
ul-style:
style: dash
ol-prefix:
style: one
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: trailing-whitespace
- id: check-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.3
hooks:
- id: editorconfig-checker
alias: ec
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
args: ["--fix"]
- repo: https://github.com/crate-ci/typos
rev: v1.21.0
hooks:
- id: typos
pass_filenames: false
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"yzhang.markdown-all-in-one"
]
}
28 changes: 28 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Walrus Code of Conduct

Walrus is a part of the Sui ecosystem and follows the same code of conduct.
mlegner marked this conversation as resolved.
Show resolved Hide resolved
mlegner marked this conversation as resolved.
Show resolved Hide resolved

As an open-source project, we encourage free discussion rooted in respect.
We endeavor to always be mindful of others' perspectives and ask all
fellow contributors to do the same. We welcome you to the Sui platform
and ask you to help us grow it with relevant, on-point contributions.

## Our pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## More information

See the central [Sui Code of Conduct](https://docs.sui.io/code-of-conduct) for
full details.

Our Code of Conduct is adapted from the [Contributor Covenant version
2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
Walrus is a decentralized blob store using [Sui](https://github.com/MystenLabs/sui) for coordination
and governance.

## Get help and report issues

If you have general questions or require help on how to use Walrus, please check for [existing
discussions](https://github.com/MystenLabs/walrus-docs/discussions). If your question is not
answered yet, you can [open a new
discussion](https://github.com/MystenLabs/walrus-docs/discussions/new?category=q-a).

If you experience any issues or bugs, please [check for existing
issues](https://github.com/MystenLabs/walrus-docs/issues) and [file an
issue](https://github.com/MystenLabs/walrus-docs/issues/new) if it hasn't been reported yet.

## License

This project is licensed under the Apache License, Version 2.0 ([LICENSE](LICENSE) or
Expand Down