From 4b6e972eacbc7c82f8a9cceac5a8f8ef45157969 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Tue, 17 Feb 2026 13:51:08 +0100 Subject: [PATCH 1/2] chore: prepare repository for open source release Add GitHub issue templates (bug report, feature request) and PR template. Remove Makefile in favor of standard Go tool commands. --- .github/ISSUE_TEMPLATE/bug_report.yml | 42 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 27 ++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 13 +++++++ CONTRIBUTING.md | 8 ++--- Makefile | 26 -------------- README.md | 15 +++----- 6 files changed, 90 insertions(+), 41 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 Makefile diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2a12f3f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,42 @@ +name: Bug Report +description: Report a bug or unexpected behavior +labels: ["bug"] +body: + - type: textarea + id: description + attributes: + label: Description + description: What happened? + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: Commands or steps to reproduce the issue. + placeholder: | + 1. Run `esq ...` + 2. ... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + validations: + required: true + + - type: textarea + id: version + attributes: + label: Environment + description: Output of `esq --version`, OS, and Elasticsearch version. + placeholder: | + esq version: v0.1.0 + OS: macOS 15.2 / Ubuntu 24.04 / Windows 11 + Elasticsearch: 8.x + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..16951b4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,27 @@ +name: Feature Request +description: Suggest a new feature or improvement +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What problem does this solve? What are you trying to do? + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: How should this work? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Any workarounds or alternative approaches you've considered. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..5be4d85 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +## Summary + + + +## Changes + +- + +## Testing + +- [ ] `go test -race ./...` passes +- [ ] `golangci-lint run` passes +- [ ] Tested manually against an Elasticsearch cluster (if applicable) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c0671b..95ef7ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,9 +7,9 @@ Thanks for your interest in contributing! Here's how to get started. ```bash git clone https://github.com/enthus-appdev/esq-cli.git cd esq-cli -make build # Build the binary -make test # Run tests -make lint # Run goimports + golangci-lint +go build ./cmd/esq # Build the binary +go test -race ./... # Run tests +golangci-lint run # Lint ``` Requires Go 1.24+ and [golangci-lint](https://golangci-lint.run/). @@ -18,7 +18,7 @@ Requires Go 1.24+ and [golangci-lint](https://golangci-lint.run/). 1. Fork the repository and create a feature branch from `main` 2. Write your code and add tests where appropriate -3. Run `make lint && make test` to ensure all checks pass +3. Run `golangci-lint run && go test -race ./...` to ensure all checks pass 4. Commit with a clear message describing the change 5. Open a pull request against `main` diff --git a/Makefile b/Makefile deleted file mode 100644 index 9d65a16..0000000 --- a/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -BINARY_NAME := esq -VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") -COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "none") -LDFLAGS := -ldflags "-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT)" - -.PHONY: all build install clean lint test help - -all: build ## Build the application (default) - -build: ## Build to bin/esq - go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/esq - -install: build ## Build + copy to ~/bin/ - cp bin/$(BINARY_NAME) $(HOME)/bin/$(BINARY_NAME) - -clean: ## Remove build artifacts - rm -rf bin/ dist/ coverage.out coverage.html - -lint: ## Run goimports + golangci-lint - goimports -w . && golangci-lint run - -test: ## Run tests - go test -v ./... - -help: ## Show this help - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' diff --git a/README.md b/README.md index c429258..4ad8e2d 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,10 @@ Query and inspect Elasticsearch clusters across environments from the command li Requires Go 1.24+. ```bash -# Via go install go install github.com/enthus-appdev/esq-cli/cmd/esq@latest - -# Or clone and build -git clone https://github.com/enthus-appdev/esq-cli.git -cd esq-cli -make install # builds and copies to ~/bin/ ``` -Ensure `~/go/bin` or `~/bin` is in your `PATH`. +Ensure `~/go/bin` is in your `PATH`. ## Setup @@ -109,10 +103,9 @@ esq completion fish > ~/.config/fish/completions/esq.fish ## Development ```bash -make build # Build to bin/esq -make install # Build + copy to ~/bin/ -make lint # goimports + golangci-lint -make test # Run tests +go build ./cmd/esq # Build the binary +go test -race ./... # Run tests +golangci-lint run # Lint ``` ## License From 8da8b6f92016e99cf7cba8d3d14c87e37746135e Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Tue, 17 Feb 2026 13:57:35 +0100 Subject: [PATCH 2/2] chore: add placeholder comment to PR template changes section --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5be4d85..bcf54a3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,7 @@ ## Changes + - ## Testing