Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
45 changes: 0 additions & 45 deletions .coderabbit.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug Report
description: File a bug report
labels: ["type: bug"]
labels: ["bug"]

body:
- type: markdown
Expand Down
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
---
blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/TomerFi/version-bumper-action/discussions/
about: You can also use Discussions for questions and ideas.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: Feature request
description: Suggest an idea for this project
labels: ["type: enhancement"]
labels: ["enhancement"]

body:
- type: markdown
attributes:
value: Thanks for taking the suggest an idea!
value: Thanks for taking the time to suggest an idea!

- type: textarea
id: feature-idea
Expand All @@ -22,6 +22,6 @@ body:
description: If so, please provide as much information as you can.

- type: textarea
id: implementation-lead
id: implementation-idea
attributes:
label: Any lead on how this feature may be implemented?
label: Any lead on how this feature can be implemented?
5 changes: 5 additions & 0 deletions .github/auto-me-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/apps/auto-me-bot
---
pr:
conventionalTitle:
tasksList:
7 changes: 1 addition & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "type: dependencies"
interval: "weekly"
commit-message:
prefix: "ci"
rebase-strategy: disabled
assignees:
- "TomerFi"
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ permissions:
pull-requests: read

jobs:
actionlint:
lint:
runs-on: ubuntu-latest
name: Lint action and workflows
name: Lint
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Run actionlint
uses: reviewdog/action-actionlint@dbe5299849118fd6f099ba563d263d770955a64a # v1.73.2
- name: Set up editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c # v.2.2.0

- name: Ensure assistant files are linked
uses: tomerfi/aicfg/link@7a71c5c7e0d8d9ebdd4a2e9212c9bb04a49c687f # 0.2.0
with:
actionlint_flags: -shellcheck= -pyflakes=
source: agents
target: claude-code
Comment thread
coderabbitai[bot] marked this conversation as resolved.

test:
needs: actionlint
needs: lint
uses: ./.github/workflows/test_action.yml
20 changes: 20 additions & 0 deletions .lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
assert_lefthook_installed: true

pre-commit:
parallel: true
commands:
no-commit-to-master:
run: '[ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]'
actionlint:
glob: ".github/workflows/*.{yml,yaml}"
run: actionlint {staged_files}
editorconfig-checker:
run: editorconfig-checker {staged_files}
aicfg-link:
glob:
- CLAUDE.md
- AGENTS.md
- .claude/**
- .agents/**
run: uvx aicfg link agents --to claude-code --ci
28 changes: 25 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,31 @@

A GitHub Actions **composite action** wrapping [@tomerfi/version-bumper](https://github.com/TomerFi/version-bumper) for semantic version bumping based on conventional commits.

## Tech Stack
## AI Policy

This project has an [AI policy](AI_POLICY.md). Always read it and ensure all suggestions, code, and contributions comply. If any behavior seems to conflict with the policy, warn the user and ask for guidance.

## Architecture

- `action.yml` — composite action entrypoint with inline bash scripts
- `.github/workflows/` — CI workflows (CI, test, release, new version bumper)
- `.github/workflows/test_action.yml` — reusable workflow for testing the action

## Working Environment

- This is a **GitHub Actions composite action** project.
- This project uses [**lefthook**](https://github.com/evilmartians/lefthook) for Git hooks. Install the hook with `lefthook install`.
- The pre-commit hook blocks commits to `master` and validates workflows with actionlint, editorconfig-checker, and aicfg.

## Linting

```bash
actionlint
editorconfig-checker
uvx aicfg link agents --to claude-code --ci
```

## Bash Scripting

- **Runtime:** Bash inline scripts in `action.yml`
- **Package:** `@tomerfi/version-bumper` (pinned via `VB_VERSION` env var)
Expand Down Expand Up @@ -33,5 +57,3 @@ Testing conventions for the action's CI workflows.
- Test all functionality in `test_action.yml` workflow
- Test automatic and manual sources
- Test all bump types (major/minor/patch/auto)


1 change: 0 additions & 1 deletion CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions CLAUDE.md
111 changes: 33 additions & 78 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,54 @@
# Contributing to *version-bumper-action*

:clap: First, thank you for taking the time to contribute. :clap:
Thank you for contributing. This guide covers the essentials.

## How to Contribute
## AI Policy

- Fork the repository
- Create a new branch on your fork
- Commit your work following [Conventional Commits](https://conventionalcommits.org)
- Create a pull request against the `master` branch
- All PRs are squash merged, so your PR title becomes the commit message
This project has a clear AI policy — read [AI_POLICY.md](AI_POLICY.md) and follow it. You're responsible for everything you submit.

## Conventional Commits
## Setup

This project uses conventional commits, and **this is critical** because the action itself uses conventional commits to determine version bumps.

Use these prefixes:
- `feat:` - New feature (triggers minor bump)
- `fix:` - Bug fix (triggers patch bump)
- `docs:` - Documentation changes only
- `chore:` - Maintenance tasks, dependency updates
- `refactor:` - Code refactoring
- `test:` - Test changes

Breaking changes (major bump) should include `BREAKING CHANGE:` in the commit body.

## Testing
```bash
git clone <repo-url>
cd version-bumper-action
```

All changes are tested automatically via the `.github/workflows/test_action.yml` workflow. The test suite covers:
- Automatic version bumping (patch, minor, major)
- Manual version bumping
- Custom labels
- Output parsing
See [AGENTS.md](AGENTS.md) for linting and testing commands.

Tests run on every PR. Make sure they pass before requesting review.
## Local Checks

## Local Development
This project uses [**lefthook**](https://github.com/evilmartians/lefthook) for Git hooks. Install with `lefthook install`.

### Linting
The pre-commit hook enforces:

Validate action.yml and workflows locally before pushing:
- **Branch protection** — blocks commits directly to `master`
- **Workflow validation** — actionlint validates GitHub Actions workflows
- **EditorConfig** — editorconfig-checker enforces consistent file formatting
- **Assistant files** — aicfg keeps project instructions in sync; run `uvx aicfg link agents --to claude-code --ci` to link

```bash
actionlint
# Auto-installed by `lefthook install`
# Runs automatically on every commit (unless on master, which is blocked)
```

Install actionlint:
```bash
# macOS (Homebrew)
brew install actionlint

# Linux (download binary)
# See https://github.com/rhysd/actionlint/releases
To run checks manually against all files:

# Or aqua
aqua g -i actionlint
```bash
actionlint
editorconfig-checker
uvx aicfg link agents --to claude-code --ci
```

## AI-Assisted Development

This project is configured for AI-assisted maintenance:

### CodeRabbit
- Automated code reviews on all PRs
- Reviews action.yml for shell script best practices and action structure
- Reviews workflows for security and efficiency
- Address review comments and use `@coderabbitai resolve` when fixed

### Cursor IDE
- **Project Rules:** See `.cursor/rules/project-rules.mdc` for project conventions
- Bash scripting guidelines for inline scripts
- Conventional commit requirements
- Testing requirements
- **Commands:** See `.cursor/commands/` for available commands
- `lint` - Run actionlint locally to validate action.yml and workflows

### Third-Party Tools
- **Dependabot:** Automatically updates GitHub Actions dependencies
- **actionlint:** Lints action.yml and workflow files in CI (validates YAML and inline shell scripts)

## Updating version-bumper Dependency

The action depends on the [@tomerfi/version-bumper](https://github.com/TomerFi/version-bumper) npm package. This is managed automatically:

- The `.github/workflows/new_version_bumper.yml` workflow detects new releases
- Automatically creates a PR with the updated version
- Simply review and merge the PR

Manual updates (if needed):
1. Update `VB_VERSION` in `action.yml`
2. Test via CI
3. Submit PR
## Commit Style

## Project Maintenance
- Conventional commits: `feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `test:`
- One logical change per commit

- PRs are reviewed by [@TomerFi](https://github.com/TomerFi) (see [CODEOWNERS](.github/CODEOWNERS))
- All PRs must pass CI checks before merging
- Keep the README usage example current (automated during releases)
## PR Process

1. Branch from `master` with a conventional name: `feat/add-input`, `fix/bump-error`
2. Use a conventional PR title (`feat:`, `fix:`, `docs:`, etc.).
3. Commit with a descriptive message
4. Run all checks before submitting
5. Open PR with a clear description of what changed and why
6. Address feedback