Skip to content

Commit a6a3fe0

Browse files
committed
chore: Initial code import
Signed-off-by: Pierre-Henri Symoneaux <[email protected]>
0 parents  commit a6a3fe0

File tree

525 files changed

+142608
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

525 files changed

+142608
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint Conventional Commits
2+
description: Verify that all the commits complies to the conventional commit convention
3+
4+
inputs:
5+
config:
6+
description: Path to the configuration file
7+
default: .github/commitlint.config.js
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install commitlint
13+
shell: bash
14+
run: |
15+
npm install conventional-changelog-conventionalcommits
16+
npm install commitlint@latest
17+
npm install @commitlint/{cli,config-conventional}
18+
19+
- name: Validate current commit (last commit) with commitlint
20+
if: github.event_name == 'push'
21+
shell: bash
22+
run: npx commitlint --config ${{ inputs.config }} --last --verbose
23+
24+
- name: Validate PR commits with commitlint
25+
if: github.event_name == 'pull_request'
26+
shell: bash
27+
run: npx commitlint --config ${{ inputs.config }} --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Setup Build Env
2+
description: Setup build environment with go
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Set up Go
8+
uses: actions/setup-go@v4
9+
with:
10+
go-version: "1.23"

.github/commitlint.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const Configuration = {
2+
// See https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts
3+
extends: ['@commitlint/config-conventional'],
4+
rules: {
5+
'subject-case': [
6+
0,
7+
'never',
8+
// Allow Sentence-case. See https://commitlint.js.org/reference/rules.html#subject-case
9+
['start-case', 'pascal-case', 'upper-case']
10+
]
11+
}
12+
};
13+
14+
module.exports = Configuration;

.github/dependabot.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: weekly
12+
reviewers:
13+
- ovh/kms
14+
- package-ecosystem: "gomod"
15+
directories:
16+
- "/"
17+
schedule:
18+
interval: "weekly"
19+
allow:
20+
- dependency-type: all
21+
reviewers:
22+
- ovh/kms
23+
open-pull-requests-limit: 10

.github/release-note.toml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# git-cliff ~ default configuration file
2+
# https://git-cliff.org/docs/configuration
3+
#
4+
# Lines starting with "#" are comments.
5+
# Configuration options are organized into tables and keys.
6+
# See documentation for more information on available options.
7+
8+
[changelog]
9+
# changelog header
10+
header = ""
11+
# template for the changelog body
12+
# https://keats.github.io/tera/docs/#introduction
13+
body = """
14+
{% for group, commits in commits | group_by(attribute="group") %}
15+
### {{ group | striptags | trim | upper_first }}
16+
{% for commit in commits %}
17+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
18+
{% if commit.breaking %}[**breaking**] {% endif %}\
19+
{{ commit.message | upper_first }}\
20+
{% endfor %}
21+
{% endfor %}
22+
{% set breaking = (commits | filter(attribute="breaking", value=true) | map(attribute="breaking_description")) -%}
23+
{% if breaking -%}
24+
### ⚠️ BREAKING CHANGES:
25+
{% for bk in breaking %}
26+
- {{ bk -}}
27+
{% endfor %}
28+
{% endif %}
29+
"""
30+
# template for the changelog footer
31+
footer = ""
32+
# remove the leading and trailing s
33+
trim = true
34+
# postprocessors
35+
postprocessors = [
36+
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
37+
]
38+
39+
[git]
40+
# parse the commits based on https://www.conventionalcommits.org
41+
conventional_commits = true
42+
# filter out the commits that are not conventional
43+
filter_unconventional = false
44+
# process each line of a commit as an individual commit
45+
split_commits = false
46+
# regex for preprocessing the commit messages
47+
commit_preprocessors = [
48+
# Replace issue numbers
49+
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
50+
# Check spelling of the commit with https://github.com/crate-ci/typos
51+
# If the spelling is incorrect, it will be automatically fixed.
52+
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
53+
]
54+
# regex for parsing and grouping commits
55+
commit_parsers = [
56+
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
57+
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
58+
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
59+
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
60+
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
61+
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
62+
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
63+
{ message = "^chore\\(release\\): prepare for", skip = true },
64+
{ message = "^chore\\(deps.*\\)", skip = true },
65+
{ message = "^chore\\(pr\\)", skip = true },
66+
{ message = "^chore\\(pull\\)", skip = true },
67+
{ message = "^chore|^ci|^build\\(deps\\)", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
68+
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
69+
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
70+
]
71+
# protect breaking changes from being skipped due to matching a skipping commit_parser
72+
protect_breaking_commits = false
73+
# filter out the commits that are not matched by commit parsers
74+
filter_commits = false
75+
# regex for matching git tags
76+
# tag_pattern = "v[0-9].*"
77+
# regex for skipping tags
78+
# skip_tags = ""
79+
# regex for ignoring tags
80+
# ignore_tags = ""
81+
# sort the tags topologically
82+
topo_order = false
83+
# sort the commits inside sections by oldest/newest order
84+
sort_commits = "oldest"
85+
# limit the number of commits included in the changelog.
86+
# limit_commits = 42

.github/workflows/pull-request.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pull-request
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
commitlint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- name: Lint commits
15+
if: github.event.pull_request.user.login != 'dependabot[bot]'
16+
uses: ./.github/actions/lint-commit
17+
18+
build:
19+
needs:
20+
- commitlint
21+
uses: ./.github/workflows/test.yaml

.github/workflows/release.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
push:
5+
# run only against tags
6+
tags:
7+
- "v*"
8+
9+
permissions:
10+
contents: write
11+
packages: write
12+
13+
jobs:
14+
test:
15+
uses: ./.github/workflows/test.yaml
16+
secrets: inherit
17+
18+
release:
19+
needs: test
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
fetch-tags: true
26+
- run: git fetch --force --tags
27+
- uses: ./.github/actions/setup-build-env
28+
- name: Generate a changelog
29+
uses: orhun/git-cliff-action@v4
30+
with:
31+
config: .github/release-note.toml
32+
args: --verbose --current
33+
env:
34+
OUTPUT: tmp.CHANGELOG.md
35+
- name: Release
36+
uses: softprops/action-gh-release@v2
37+
if: startsWith(github.ref, 'refs/tags/')
38+
with:
39+
# prerelease: true
40+
name: ${{ github.ref_name }}
41+
# draft: true
42+
body_path: tmp.CHANGELOG.md
43+

.github/workflows/test.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will build a golang project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+
name: test
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
workflow_call: {}
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/setup-build-env
17+
- name: Unit Test
18+
run: go test -race -v ./...
19+
- name: Run benchmarks
20+
run: go test -benchmem -bench . -run ^$ ./...
21+
22+
lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: ./.github/actions/setup-build-env
27+
- name: Lint library
28+
uses: golangci/golangci-lint-action@v6
29+
with:
30+
version: v1.60

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
certs/
2+
dist/
3+
.build/
4+
*.pem
5+
*.log
6+
*.db
7+
*.exe
8+
9+
bin/
10+
git-cliff-*
11+
tmp.CHANGELOG.md

AUTHORS

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This is the official list of kmip-go authors for copyright purposes.
2+
# This file is distinct from the CONTRIBUTORS files
3+
# and it lists the copyright holders only.
4+
5+
# Names should be added to this file as one of
6+
# Organization's name
7+
# Individual's name <submission email address>
8+
# Individual's name <submission email address> <email2> <emailN>
9+
# See CONTRIBUTORS for the meaning of multiple email addresses.
10+
11+
# Please keep the list sorted.
12+
13+
OVH SAS
14+
Pierre-Henri Symoneaux <[email protected]>

0 commit comments

Comments
 (0)