-
Clone the repository:
git clone https://github.com/andoniaf/telegram-pr-notify.git cd telegram-pr-notify -
Copy the environment example and fill in your test credentials:
cp .envrc.example .envrc # Edit .envrc with your Telegram bot token and chat ID direnv allow # if using direnv
-
Run the tests:
make test
.
├── main.go # Entry point, reads env vars and orchestrates
├── pkg/
│ ├── events/ # GitHub event parsing and TemplateData model
│ ├── templates/ # Template rendering and default templates
│ └── telegram/ # Telegram Bot API client
├── testdata/ # JSON fixtures for event parsing tests
├── action.yml # GitHub Action definition
└── Dockerfile # Multi-stage build for the action container
make test # Run all tests
make test-v # Run tests with verbose output
make lint # Run go vet + format check
make build # Build the binaryWith direnv and a configured .envrc:
go run .This sends a test notification using the payload in .envrc (defaults to testdata/pull_request_opened.json).
make docker- Follow standard Go conventions (
gofmt,go vet). - Keep external dependencies at zero (stdlib only).
- Use
html/template(nottext/template) for Telegram HTML messages.
Use Conventional Commits for commit messages.
- Include tests for new event types or template changes.
- Update README.md if adding user-facing features.
- Ensure
make testandmake lintpass.