Skip to content

Commit

Permalink
chore: Align on boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 17, 2021
1 parent dd97416 commit 4e546dd
Show file tree
Hide file tree
Showing 17 changed files with 204 additions and 214 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

28 changes: 4 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: Bug report
description: An issue with clap, clap_derive or clap_generate
description: Things not quite working right
labels: 'T: bug'
body:
- type: checkboxes
attributes:
label: Please complete the following tasks
options:
- label: I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
required: true
- label: I have searched the existing issues
required: true
- type: input
- type: textarea
attributes:
label: Rust Version
description: Output of `rustc -V`
label: Description
validations:
required: true
- type: input
attributes:
label: Clap Version
label: Version
description: Can be found in Cargo.lock or Cargo.toml of your project (i.e. `grep clap Cargo.lock`). PLEASE DO NOT PUT "latest" HERE, use precise version. Put `master` (or other branch) if you're using the repo directly.
validations:
required: true
- type: textarea
attributes:
label: Minimal reproducible code
Expand All @@ -32,28 +26,14 @@ body:
```
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce the bug with the above code
description: A command like `cargo run -- options...` or multiple commands.
validations:
required: true
- type: textarea
attributes:
label: Actual Behaviour
description: When I do like *this*, *that* is happening and I think it shouldn't.
validations:
required: true
- type: textarea
attributes:
label: Expected Behaviour
description: I think *this* should happen instead.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Add any other context about the problem here.
- type: textarea
attributes:
label: Debug Output
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question
about: You've come to seek help or want to discuss something related to clap
about: For support or brainstorming
url: https://github.com/clap-rs/clap/discussions/new
# TODO: Question template (waiting for discussions template feature)
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/documentation_issue.yml

This file was deleted.

27 changes: 7 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,22 @@ labels: 'T: new feature'
body:
- type: checkboxes
attributes:
label: Please complete the following tasks
options:
- label: I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
required: true
- label: I have searched the existing issues
required: true
- type: input
attributes:
label: Clap Version
label: Version
description: Can be found in Cargo.lock or Cargo.toml of your project (i.e. `grep clap Cargo.lock`). PLEASE DO NOT PUT "latest" HERE, use precise version. Put `master` (or other branch) if you're using the repo directly.
validations:
required: true
- type: textarea
attributes:
label: Describe your use case
description: Describe the problem you're trying to solve. This is not mandatory and we *do* consider features without a specific use case, but real problems have priority.
validations:
required: true
label: Use Case
description: Describe the problem you're trying to solve.
- type: textarea
attributes:
label: Describe the solution you'd like
description: Please explain what the wanted solution should look like. You are **strongly encouraged** to attach a snippet of (pseudo)code.
validations:
required: true
label: Requirements
description: Describe what is needed to satisfy your use case.
- type: textarea
attributes:
label: Alternatives, if applicable
description: A clear and concise description of any alternative solutions or features you've managed to come up with.
- type: textarea
attributes:
label: Additional Context
description: Add any other context about the feature request here.
label: Possible Solutions
description: A clear and concise description of any solutions or features you've managed to come up with.
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: monthly
time: "07:00"
open-pull-requests-limit: 10
48 changes: 48 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
description: A full featured, fast Command Line Argument Parser for Rust
homepage: docs.rs/clap
topics: rust cli command-line argparse clap
has_issues: true
has_projects: false
has_wiki: false
has_downloads: true
default_branch: main

allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true

# Manual: allow_auto_merge: true, see https://github.com/probot/settings/issues/402
delete_branch_on_merge: true

labels:
# Type
- name: bug
color: '#b60205'
description: Not as expected
- name: enhancement
color: '#1d76db'
description: Improve the expected
# Flavor
- name: question
color: "#cc317c"
description: Uncertainty is involved
- name: breaking-change
color: "#e99695"
- name: good first issue
color: '#c2e0c6'
description: Help wanted!

branches:
- name: main
protection:
required_pull_request_reviews: null
required_conversation_resolution: true
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: false
contexts: ["CI", "Lint Commits", "Spell Check with Typos"]
enforce_admins: false
restrictions: null
21 changes: 21 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Security audit
on:
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
schedule:
- cron: '3 3 3 * *'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/committed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint Commits
on: [pull_request]

jobs:
committed:
name: Lint Commits
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lint Commits
uses: crate-ci/committed@master
12 changes: 12 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pre-commit
on:
pull_request:
push:
branches: [source]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
12 changes: 12 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Spelling
on: [pull_request]

jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2
- name: Spell Check Repo
uses: crate-ci/typos@master
35 changes: 1 addition & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,2 @@
# Compiled files
*.o
*.so
*.rlib
*.dll

# Executables
*.exe

# Generated by Cargo
target/

# Cargo files
target
Cargo.lock

# Temp files
.*~

# Backup files
*.bak
*.bk
*.orig

# Project files
.vscode/*
.idea/*
clap-rs.iml

# Auxiliary files
test-results.test
expanded.rs
clap_derive/expanded.rs

# ctags
**/*.vi
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
stages: [commit]
- id: check-json
stages: [commit]
- id: check-toml
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: detect-private-key
stages: [commit]
- repo: https://github.com/crate-ci/committed
rev: v0.2.5
hooks:
- id: committed
stages: [commit-msg]
Loading

0 comments on commit 4e546dd

Please sign in to comment.