Skip to content

Commit

Permalink
docs: update cog.toml example and contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Jun 26, 2023
1 parent 64ddcf6 commit ee09f87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ In addition, our CI pipeline uses the following formatter and linter:

Use `cargo clippy` instead of `cargo build` to spot lints before committing your changes.

- **git-hooks**
Cocogitto provides sharable git-hooks, if you want to save the hassle of manually running lints and formatters before
each commit you can simply run `cog install-hook --all`.

### Error handling
* `unwrap()` usage should be avoided, if needed use `expect("why")` instead.
* For convenience, errors in the [cog](src/bin/cog.rs) CLI and the public API are wrapped with the
Expand Down
6 changes: 6 additions & 0 deletions cog.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# A list of glob patterns describing branches on which semver bump are allowed
branch_whitelist = ["main"]

# Ignore merge commits from conventional commit checks
ignore_merge_commits = true

# A list of command to run BEFORE creating a version.
Expand Down Expand Up @@ -31,6 +34,8 @@ post_bump_hooks = [
"echo 'we are done'"
]

# Shareable git-hooks, can be isntalled using `cog install-hook --all`
# or alternatively `cog install-hooks {commit_hook_type}
[git_hooks.commit-msg]
script = """#!/bin/sh
set -e
Expand Down Expand Up @@ -59,6 +64,7 @@ template = "remote"
remote = "github.com"
repository = "cocogitto"
owner = "cocogitto"

# Optional contributor list
# intended to map git signature to remote username
# and generate changelog links to their remote profiles
Expand Down

0 comments on commit ee09f87

Please sign in to comment.