Skip to content

Commit

Permalink
chore: more chores for opensourcing (#12)
Browse files Browse the repository at this point in the history
* adds cargo deny

* adds issue templates

* adds check pr title
  • Loading branch information
montekki authored May 2, 2024
1 parent 33d7d7a commit fdf1ea7
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Use this template for reporting issues
title: ''
labels: bug
assignees: ''
---

### 🐛 Bug Report

#### 📝 Description

Provide a clear and concise description of the bug.

#### 🔄 Reproduction Steps

Steps to reproduce the behaviour

#### 🤔 Expected Behavior

Describe what you expected to happen.

#### 😯 Current Behavior

Describe what actually happened.

#### 🖥️ Environment

Any relevant environment details.

#### 📋 Additional Context

Add any other context about the problem here. If applicable, add screenshots to help explain.

#### 📎 Log Output

```
Paste any relevant log output here.
```
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Use this template for requesting features
title: ''
labels: feat
assignees: ''
---

### 🌟 Feature Request

#### 📝 Description

Provide a clear and concise description of the feature you'd like to see.

#### 🤔 Rationale

Explain why this feature is important and how it benefits the project.

#### 📋 Additional Context

Add any other context or information about the feature request here.
29 changes: 29 additions & 0 deletions .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cargo Deny

on:
push:
branches:
- main
pull_request:
merge_group:

env:
CARGO_TERM_COLOR: always

jobs:
cargo_deny:
runs-on: [matterlabs-ci-runner]
strategy:
matrix:
checks:
- advisories
- bans licenses sources

# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}

steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
20 changes: 20 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check PR title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
merge_group:

jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70 changes: 70 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
targets = []
all-features = false
no-default-features = false
feature-depth = 1

[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = [
"RUSTSEC-2023-0052"
]

[licenses]
unlicensed = "deny"
copyleft = "deny"
allow = [
"MIT",
"Apache-2.0",
"ISC",
"Unlicense",
"MPL-2.0",
"Unicode-DFS-2016",
"CC0-1.0",
"BSD-2-Clause",
"BSD-3-Clause",
"OpenSSL",
]
deny = []
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8
exceptions = []

[[licenses.clarify]]
name = "ring"
version = "*"
expression = "MIT AND ISC AND OpenSSL"
license-files = [
{ path = "LICENSE", hash = 0xbd0eed23 }
]

[licenses.private]
ignore = false
registries = []

[bans]
multiple-versions = "warn"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"
allow = []
deny = []
skip = []
skip-tree = []

[sources]
unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []

[sources.allow-org]
github = [""]
gitlab = [""]
bitbucket = [""]

0 comments on commit fdf1ea7

Please sign in to comment.