Skip to content
Open
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing to ticket

Thank you for your interest in contributing! This document outlines how to set up the project, run tests, and submit changes.

## Development Setup

### Prerequisites

- Bash (POSIX-compatible)
- coreutils
- `jq` (for the `query` command)
- `rg` / ripgrep (optional, falls back to grep)

### Install from Source

```bash
git clone https://github.com/wedow/ticket.git
cd ticket
ln -s "$PWD/ticket" ~/.local/bin/tk
# Or add to PATH
```

Verify installation:
```bash
tk help
```

### Running Tests

Tests use [behave](https://behave.readthedocs.io/) (Python BDD framework).

With `uv` installed:
```bash
make test
```

Without `uv`:
```bash
pip install behave
make test
```

## Coding Standards

- Write POSIX-compatible bash scripts
- Keep dependencies minimal (coreutils + optional jq/rg)
- Follow the Unix Philosophy: do one thing well
- Add plugin descriptions using `# tk-plugin: description` in the first 10 lines

## Submitting Changes

1. Fork the repository
2. Create a feature branch: `git checkout -b my-feature`
3. Make your changes
4. Run tests: `make test`
5. Commit with a clear message
6. Push to your fork
7. Open a pull request against `wedow/ticket`

## Project Structure

```
ticket # Main executable script
CLAUDE.md # AI agent instructions
Makefile # Build/test targets
features/ # behave test scenarios
plugins/ # Bundled plugins
pkg/ # Library functions
scripts/ # Utility scripts
```

## Getting Help

- Open an issue for bugs or feature requests
- Use `tk help` for CLI reference
- Check README.md for usage examples
2 changes: 1 addition & 1 deletion plugins/ticket-edit
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [[ ! -f "$file" ]]; then
fi

if [ -t 0 ] && [ -t 1 ]; then
"${EDITOR:-vi}" "$file"
${EDITOR:-vi} "$file"
else
echo "Edit ticket file: $file"
fi