Skip to content

Commit c881955

Browse files
sestinjclaude
andcommitted
docs: polish repo with branding, community files, CI/CD, and publishing
- README overhaul with banner, Why section, config reference, and TOC - Community files: LICENSE (Apache-2.0), CONTRIBUTING.md, SECURITY.md - Issue templates (bug report + feature request) and PR template - OG card HTML for social preview - Usage skill (skill/SKILL.md) for agent-assisted setup - PR check for config consistency - CI workflow (build + test on push/PR) - Release workflow with GoReleaser for cross-platform binaries - .goreleaser.yml for automated releases on version tags Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ea372a3 commit c881955

17 files changed

Lines changed: 858 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Config Consistency
3+
on:
4+
- pull_request
5+
---
6+
7+
# Config Consistency Check
8+
9+
Review changes to ensure the config format stays consistent and documented.
10+
11+
## What to check
12+
13+
1. **If `config.go` changes the `Source` or `Webhook` struct fields**: verify that `README.md` config documentation, `testdata/example.yaml`, and `skill/SKILL.md` are updated to reflect new/changed/removed fields.
14+
15+
2. **If `config.go` adds new validation rules**: verify that `pollhook_test.go` has test cases for the new validation (both positive and negative cases).
16+
17+
3. **If the webhook payload format changes in `webhook.go`**: verify that `README.md`'s "How It Works" section and the skill's config example are updated.
18+
19+
## What NOT to check
20+
21+
- Code style or formatting
22+
- Test coverage percentages
23+
- Import ordering

.github/CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contributing to pollhook
2+
3+
Thanks for your interest in contributing to pollhook!
4+
5+
## Development Setup
6+
7+
```bash
8+
git clone https://github.com/continuedev/pollhook.git
9+
cd pollhook
10+
make build # Build the binary
11+
make test # Run tests
12+
```
13+
14+
Requires Go 1.22+.
15+
16+
## Project Structure
17+
18+
```
19+
main.go # CLI entry: serve, test, version commands
20+
config.go # YAML config types, loader, validation
21+
dotpath.go # JSON dot-path extraction (items array + ID field)
22+
state.go # Seen-ID tracking with 10K cap, atomic file persistence
23+
webhook.go # HTTP POST delivery with retry
24+
poller.go # Core poll loop: exec → extract → dedup → deliver
25+
pollhook_test.go # Unit tests
26+
testdata/ # Example configs
27+
```
28+
29+
All files are in `package main`. No `internal/` — the codebase is intentionally flat.
30+
31+
## Making Changes
32+
33+
1. Fork the repo and create a branch from `main`
34+
2. Make your changes
35+
3. Add or update tests as needed
36+
4. Run `make test` to verify
37+
5. Commit using [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, etc.)
38+
6. Open a PR
39+
40+
## Conventional Commits
41+
42+
We use Conventional Commits for changelog generation:
43+
44+
- `feat: add PagerDuty example config` — new feature
45+
- `fix: handle empty JSON arrays` — bug fix
46+
- `docs: update config reference` — documentation only
47+
- `refactor: simplify state persistence` — code change that neither fixes a bug nor adds a feature
48+
- `test: add webhook retry tests` — adding or updating tests
49+
50+
## Reporting Bugs
51+
52+
Use the [bug report template](https://github.com/continuedev/pollhook/issues/new?template=bug_report.yml) to file issues. Include:
53+
54+
- Your pollhook version (`pollhook version`)
55+
- Your Go version (`go version`)
56+
- Config file (redact secrets)
57+
- Command output / error messages
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Bug Report
2+
description: Report a bug in pollhook
3+
labels: [bug]
4+
body:
5+
- type: input
6+
id: version
7+
attributes:
8+
label: pollhook version
9+
description: Output of `pollhook version`
10+
placeholder: "pollhook dev"
11+
validations:
12+
required: true
13+
14+
- type: input
15+
id: go-version
16+
attributes:
17+
label: Go version
18+
description: Output of `go version`
19+
placeholder: "go1.22.0 darwin/arm64"
20+
validations:
21+
required: true
22+
23+
- type: dropdown
24+
id: command
25+
attributes:
26+
label: Command
27+
description: Which command were you running?
28+
options:
29+
- serve
30+
- test
31+
- Other
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: description
37+
attributes:
38+
label: Description
39+
description: What happened? What did you expect?
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: repro
45+
attributes:
46+
label: Steps to reproduce
47+
description: Minimal steps to reproduce the issue
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: logs
53+
attributes:
54+
label: Logs / error output
55+
description: Paste relevant log output (redact any secrets)
56+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem
9+
description: What problem are you trying to solve?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: solution
15+
attributes:
16+
label: Proposed solution
17+
description: How would you like this to work?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: alternatives
23+
attributes:
24+
label: Alternatives considered
25+
description: What other approaches did you consider?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Description
2+
3+
<!-- What does this PR do? Why? -->
4+
5+
## Type of change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Documentation
10+
- [ ] Refactor
11+
- [ ] Other (describe below)
12+
13+
## Checklist
14+
15+
- [ ] Tests added/updated
16+
- [ ] Types are correct
17+
- [ ] Commit messages follow Conventional Commits
18+
- [ ] README updated (if applicable)

.github/SECURITY.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
If you discover a security vulnerability in pollhook, please report it responsibly.
6+
7+
**Email:** security@continue.dev
8+
9+
We will acknowledge your report within 48 hours and provide a timeline for a fix.
10+
11+
## Scope
12+
13+
Security issues we care about:
14+
15+
- **Command injection** via config file values or environment variable expansion
16+
- **Secret leakage** in logs, state files, or error messages (webhook secrets, API tokens)
17+
- **State file tampering** leading to replay attacks or missed events
18+
- **SSRF** via crafted webhook URLs or command output
19+
20+
## Out of Scope
21+
22+
- Vulnerabilities in upstream dependencies (report to the upstream project)
23+
- Issues requiring local access to the machine running pollhook
24+
- Denial of service via large API responses (bounded by command timeout)

.github/assets/continue-banner.png

2.01 MB
Loading

.github/assets/og-card.html

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<style>
6+
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&family=IBM+Plex+Sans:wght@300;400&display=swap');
7+
8+
* { margin: 0; padding: 0; box-sizing: border-box; }
9+
10+
body {
11+
width: 1280px;
12+
height: 640px;
13+
background: hsl(0 0% 95.3%);
14+
font-family: 'IBM Plex Sans', sans-serif;
15+
display: flex;
16+
flex-direction: column;
17+
justify-content: center;
18+
padding: 80px 100px;
19+
position: relative;
20+
overflow: hidden;
21+
}
22+
23+
.ambient {
24+
position: absolute;
25+
top: -80px;
26+
right: -120px;
27+
width: 600px;
28+
height: 600px;
29+
background: radial-gradient(circle at center,
30+
rgba(100, 120, 255, 0.12) 0%,
31+
rgba(180, 100, 255, 0.08) 40%,
32+
transparent 70%
33+
);
34+
filter: blur(40px);
35+
pointer-events: none;
36+
}
37+
38+
.label {
39+
font-family: 'IBM Plex Mono', monospace;
40+
font-size: 13px;
41+
font-weight: 400;
42+
text-transform: uppercase;
43+
letter-spacing: 0.2em;
44+
color: rgba(0, 0, 0, 0.3);
45+
margin-bottom: 20px;
46+
}
47+
48+
.title {
49+
font-size: 80px;
50+
font-weight: 300;
51+
letter-spacing: -2px;
52+
color: rgba(0, 0, 0, 0.88);
53+
line-height: 1;
54+
margin-bottom: 16px;
55+
}
56+
57+
.tagline {
58+
font-size: 24px;
59+
font-weight: 400;
60+
color: rgba(0, 0, 0, 0.4);
61+
margin-bottom: 48px;
62+
}
63+
64+
.install-pill {
65+
display: inline-block;
66+
font-family: 'IBM Plex Mono', monospace;
67+
font-size: 16px;
68+
font-weight: 400;
69+
color: rgba(0, 0, 0, 0.55);
70+
background: rgba(0, 0, 0, 0.04);
71+
border: 1px solid rgba(0, 0, 0, 0.06);
72+
border-radius: 8px;
73+
padding: 12px 24px;
74+
}
75+
76+
.footer {
77+
position: absolute;
78+
bottom: 40px;
79+
left: 100px;
80+
right: 100px;
81+
border-top: 1px solid rgba(0, 0, 0, 0.06);
82+
padding-top: 20px;
83+
display: flex;
84+
justify-content: space-between;
85+
align-items: center;
86+
}
87+
88+
.footer-logo {
89+
font-family: 'IBM Plex Sans', sans-serif;
90+
font-size: 15px;
91+
font-weight: 400;
92+
color: rgba(0, 0, 0, 0.25);
93+
}
94+
95+
.footer-url {
96+
font-family: 'IBM Plex Mono', monospace;
97+
font-size: 14px;
98+
color: rgba(0, 0, 0, 0.25);
99+
}
100+
</style>
101+
</head>
102+
<body>
103+
<div class="ambient"></div>
104+
<div class="label">Continue</div>
105+
<div class="title">pollhook</div>
106+
<div class="tagline">Poll REST APIs, deliver webhooks</div>
107+
<div class="install-pill">go install github.com/continuedev/pollhook@latest</div>
108+
<div class="footer">
109+
<div class="footer-logo">Continue</div>
110+
<div class="footer-url">continue.dev</div>
111+
</div>
112+
</body>
113+
</html>

.github/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
changelog:
2+
categories:
3+
- title: New Features
4+
labels:
5+
- enhancement
6+
- title: Bug Fixes
7+
labels:
8+
- bug
9+
- title: Documentation
10+
labels:
11+
- documentation
12+
- title: Other
13+
labels:
14+
- "*"

0 commit comments

Comments
 (0)