Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .convcommit
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# convcommit - Conventional Commit message builder
# This file is read by the `convcommit` CLI tool to populate
# the interactive selector menus.
# Commit this file to share the project's commit vocabulary with the team.
#
# FORMAT
# type:<value> — commit type option (e.g. fix, feat, docs)
# scope:<value> — commit scope option
# message:<value> — commit message template
#
# SPECIAL PREFIXES
# ~<value> — marks the default selection
# _ — enables free-text manual input (press ".")
# [X]<value> — forces key letter X for this entry (e.g. [B]build, [W]wip)
#
# HOW TO USE (interactive)
# Run `convcommit` in a git repo. A menu appears for type, scope, message.
# Press the letter in brackets [A][B]... or [.] for free-text input.
# Stage and push in one shot:
# convcommit -a -p
#
# HOW TO USE (direct flags — scripts, AI agents)
# Bypass the selector entirely with explicit flags:
# convcommit --type fix --scope auth --message "fix null pointer" --push
# convcommit -t feat -s api -m "add endpoint" -a -p
#
# SMART PATTERN — stage specific files and commit in one command
# Use --add instead of nested command substitution.
# Anti-pattern (avoid):
# msg=$(convcommit --type fix --message "fix") && git commit -m "$msg" && git push
# Recommended:
# convcommit --add src/auth.sh --type fix --scope auth --message "fix null pointer" --push
# Stage multiple files:
# convcommit --add src/auth.sh --add tests/auth_test.sh -t test -s auth -m "add tests" -p
#
# HOW TO USE (pipe / non-interactive)
# Pipe selections as lines: one per stage (type, scope, message).
# Use the letter shown in the menu, or "." to trigger free-text input.
# Examples:
# printf "G\n.\nfix null pointer in login\n" | convcommit
# printf "F\n\nadd endpoint\n" | convcommit -a -p
# Capture just the formatted message:
# msg=$(printf "G\n\nfix null pointer\n" | convcommit)
#
# OTHER USEFUL FLAGS
# --reset Regenerate this file with the latest defaults
# --help Show all options
#
# INSTALLATION
# convcommit is a single bash file with no dependencies.
# Install it locally in your project:
# curl -fsSL https://raw.githubusercontent.com/francescobianco/convcommit/refs/heads/main/bin/convcommit \
# -o bin/convcommit && chmod +x bin/convcommit
# Or system-wide:
# curl -fsSL https://raw.githubusercontent.com/francescobianco/convcommit/refs/heads/main/bin/convcommit \
# -o /usr/local/bin/convcommit && chmod +x /usr/local/bin/convcommit
type:[B]build
type:~chore
type:[D]docs
type:deps
type:feat
type:fix
type:ci
type:init
type:merge
type:perf
type:refactor
type:revert
type:security
type:style
type:test
type:[W]wip
scope:_
scope:~
message:_
message:~_
Binary file added .github/assets/repo-header-a3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

name: build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# IDEs and editors
.idea/
.vscode/

# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Openapi®

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
86 changes: 86 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!make

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# ____ _ #
# / __ \____ ___ ____ ____ _____ (_) ® #
# / / / / __ \/ _ \/ __ \/ __ `/ __ \/ / #
# / /_/ / /_/ / __/ / / / /_/ / /_/ / / #
# \____/ .___/\___/_/ /_/\__,_/ .___/_/ #
# /_/ /_/ #
# #
# The Largest Certified API Marketplace #
# Accelerate Digital Transformation • Simplify Processes • Lead Industry #
# #
# ═══════════════════════════════════════════════════════════════════════ #
# #
# Project: openapi-go-sdk #
# Version: 0.1.0 #
# Author: L. Paderi (@lpaderiAltravia) #
# Copyright: (c) 2025 Openapi®. All rights reserved. #
# License: MIT #
# Maintainer: Francesco Bianco #
# Contact: https://openapi.com/ #
# Repository: https://github.com/openapi/openapi-go-sdk/ #
# Documentation: https://console.openapi.com/ #
# #
# ═══════════════════════════════════════════════════════════════════════ #
# #
# "Truth lies at the source of the stream." #
# — English Proverb #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

## =========
## Variables
## =========

VERSION := 0.2.1
TAG := v$(VERSION)

## ====================
## Development Commands
## ====================

test:
@go test ./...

vet:
@go vet ./...

dev-push:
@git config credential.helper 'cache --timeout=3600'
@git add .
@git commit -m "$$(read -p 'Commit message: ' msg; echo $$msg)" || true
@git push

## ================
## Release Commands
## ================

push:
@git add .
@git commit -am "Updated at $$(date)" || true
@git push

release:
@echo "==> Releasing $(TAG)..."
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then \
echo "ERROR: releases must be cut from the main branch"; exit 1; \
fi
@if [ -n "$$(git status --porcelain)" ]; then \
echo "ERROR: working directory is not clean"; exit 1; \
fi
@echo "==> Running tests..."
@go test ./...
@echo "==> Running vet..."
@go vet ./...
@echo "==> Tagging $(TAG)..."
@git tag -a "$(TAG)" -m "Release $(TAG)"
@git push origin "$(TAG)"
@echo "==> Creating GitHub release..."
@gh release create "$(TAG)" \
--title "$(TAG)" \
--generate-notes \
--verify-tag
@echo "==> Done. Release $(TAG) is live."
Loading
Loading