Skip to content

Commit feccd20

Browse files
committed
feat(commitizen): project init and basic CLI
Initialized project, added linter and formatter, added lefthook for git hooks, added goreleaser, added GitHub actions, added basic docs and implemented basic CLI tool to just show version
0 parents  commit feccd20

32 files changed

+3228
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @isokolovskii

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
blank_issues_enabled: false
3+
4+
contact_links:
5+
- name: 💡 Discuss an idea
6+
url: https://github.com/isokolovskii/commitizen@latest/discussions/new?category=ideas
7+
about: Suggest a feature or an improvement.
8+
9+
- name: ❔ Ask a question
10+
url: https://github.com/isokolovskii/commitizen@latest/discussions/new
11+
about: Ask questions and discuss with other `commitizen` users or maintainers.
12+
13+
- name: 🙏 Request help
14+
url: https://github.com/isokolovskii/commitizen@latest/discussions/new
15+
about: Ask the `commitizen` community for help.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
3+
name: ⭐ Feature request about: If you want something to be implemented in commitizen - create a feature request! If you are not sure, or just have an idea, please `Discuss an idea` instead.
4+
5+
labels: 'feature request'
6+
-------------------------
7+
8+
### Description
9+
10+
### What problem it is solving?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
name: 🐞 Report a bug about: Found a bug? Report it! If it's not yet reproducible, please `Ask a question` instead.
4+
5+
labels: 'bug'
6+
-------------
7+
8+
### Description
9+
10+
### Commands to reproduce
11+
12+
<!-- Don't forget to enable verbose logs. -->
13+
14+
```bash
15+
go tool commitizen ...
16+
```
17+
18+
### Commitizen version
19+
20+
<!-- `commitizen version -f` -->
21+
22+
### Possible solution
23+
24+
<!-- Your ideas -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Closes # (issue)
2+
3+
### Context
4+
5+
<!-- Brief description of what problem PR is solving -->
6+
7+
### Changes
8+
9+
<!-- Summary for changes in the code -->

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
target-branch: "dependencies"
7+
schedule:
8+
interval: "weekly"
9+
day: "monday"
10+
time: "06:00" # 6:00 UTC
11+
commit-message:
12+
prefix: "deps"
13+
assignees:
14+
- "isokolovskii"

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
# 6:00 UTC on Monday
10+
- cron: '0 6 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'go' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v3
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v3
40+
with:
41+
category: "/language:${{matrix.language}}"

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
name: Lint
8+
jobs:
9+
golangci:
10+
name: golangci-lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Install Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version-file: go.mod
18+
- name: golangci-lint
19+
uses: golangci/golangci-lint-action@v8
20+
with:
21+
version: v2.6.1

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
attestations: write
10+
contents: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Fetch all tags
23+
run: git fetch --force --tags
24+
25+
- name: Setup Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version-file: go.mod
29+
30+
- name: Install Snapcraft
31+
uses: samuelmeuli/action-snapcraft@v2
32+
33+
- name: Prevent from snapcraft fail
34+
run: |
35+
mkdir -p $HOME/.cache/snapcraft/download
36+
mkdir -p $HOME/.cache/snapcraft/stage-packages
37+
38+
- name: Run GoReleaser
39+
uses: goreleaser/goreleaser-action@v6
40+
with:
41+
distribution: goreleaser
42+
version: 'v2.10.2'
43+
args: release --clean --verbose
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
47+
48+
- name: Generate artifact attestations
49+
uses: actions/attest-build-provenance@v3
50+
with:
51+
subject-checksums: dist/commitizen_checksums.txt
52+
53+
- name: Preserve artifacts permissions with tar
54+
run: tar -cvf dist.tar dist/
55+
- uses: actions/upload-artifact@v4
56+
with:
57+
name: dist
58+
path: dist.tar

.github/workflows/spelling.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Spelling
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
env:
13+
CLICOLOR: 1
14+
15+
jobs:
16+
spelling:
17+
name: Spell Check with Typos
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Actions Repository
21+
uses: actions/checkout@v5
22+
- name: Spell Check Repo
23+
uses: crate-ci/typos@v1.39.2

0 commit comments

Comments
 (0)