No description
Find a file
Marcos 6f2b19e2cb [INIT] oca-feedback: GitHub mention monitor + feedback collector
- scan: fetch GitHub notifications, classify (feedback vs mention)
- check: dry-run analysis of a specific PR
- process: open Gitea issue + reply on GitHub + email notification
- review: trigger oca-reviewer on a PR
- watch: daemon mode with configurable polling

Safety: Gitea-first (won't reply on GitHub if issue creation fails)
No hardcoded secrets — all config via .config/settings.env (gitignored)
2026-03-16 01:57:04 -03:00
.config [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
scripts [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
.gitignore [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
LICENSE [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
oca-feedback [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
README.md [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00
seen_ids.txt [INIT] oca-feedback: GitHub mention monitor + feedback collector 2026-03-16 01:57:04 -03:00

OCA Feedback

GitHub mention monitor + feedback collector for OCA pull requests.

Never miss community feedback again.

What it does

  GitHub Notification (mention of @you)
         │
         ▼
  Analyze context
    Is it a reply to an oca-reviewer bot comment?
         │
    ┌────┴────┐
    ▼         ▼
  YES       NO
  Feedback  New mention
  on review on a PR
    │         │
    ▼         ▼
  Open issue  Run oca-reviewer
  on Gitea    on that PR
  + reply     + acknowledge
  on GitHub   on GitHub

Flow 1: Feedback collection

When someone replies to an oca-reviewer bot comment on a PR:

  1. Detects the reply via GitHub notifications API
  2. Opens an issue on Gitea with the feedback + action checklist
  3. Replies on GitHub thanking the user, linking the issue, and inviting them to contribute
  4. Sends email notification to the team

Flow 2: Auto-review on mention

When someone @mentions you on an OCA PR you haven't reviewed:

  1. Detects the mention via GitHub notifications API
  2. Acknowledges on GitHub ("I'll review this PR shortly")
  3. Triggers oca-reviewer for a full automated review

Install

git clone https://git.pop.coop/pop/oca-feedback.git
cd oca-feedback
cp .config/settings.env.example .config/settings.env
nano .config/settings.env   # fill in your tokens
chmod +x oca-feedback scripts/*.sh

Prerequisites

  • gh CLI authenticated (gh auth login)
  • jq installed
  • Gitea API token from your Gitea instance (Settings → Applications)
  • oca-reviewer (optional, for full K8s test reviews)

Usage

# Show all commands
./oca-feedback help

# Scan GitHub notifications once
./oca-feedback scan

# Daemon mode (polls every 5 minutes)
./oca-feedback watch

# Background daemon
nohup ./oca-feedback watch > /tmp/oca-feedback/watch.log 2>&1 &

# Dry-run: see what would happen on a specific PR
./oca-feedback check https://github.com/OCA/bank-payment/pull/1547

# Execute for real: open Gitea issue + reply on GitHub
./oca-feedback process https://github.com/OCA/bank-payment/pull/1547

# Manually trigger oca-reviewer on a PR
./oca-feedback review https://github.com/OCA/bank-payment/pull/1547

# View history of processed notifications
./oca-feedback history

Configuration

Copy .config/settings.env.example to .config/settings.env and fill in your values.

⚠️ settings.env contains secrets and is gitignored. Never commit it.

Variable Description Default
GH_USER Your GitHub username
GITEA_URL Gitea instance URL https://git.pop.coop
GITEA_TOKEN Gitea API token (required)
GITEA_REVIEWER_REPO Repo for feedback issues pop/oca-reviewer
OCA_REVIEWER_DIR Path to oca-reviewer ~/Projects/oca-reviewer
POLL_INTERVAL Seconds between scans 300
BOT_SIGNATURE Pattern to detect bot comments Automated Review
SMTP_HOST Email server (optional)
NOTIFY_EMAILS Who to notify (optional)

How it integrates

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  GitHub      │────▶│ oca-feedback  │────▶│ oca-reviewer  │
│  Notifications│     │ (classifier)  │     │ (K8s + AI)    │
└──────────────┘     └──────┬───────┘     └──────────────┘
                            │
                     ┌──────┴───────┐
                     ▼              ▼
              ┌──────────┐  ┌──────────────┐
              │ Gitea    │  │ GitHub PR    │
              │ (issues) │  │ (reply)      │
              └──────────┘  └──────────────┘

Project structure

oca-feedback/
├── oca-feedback                    # CLI entry point
├── scripts/
│   ├── scan.sh                     # Core: fetch notifications + classify + dispatch
│   ├── analyze-comment.sh          # Deep-analyze a specific PR (check/process)
│   └── trigger-review.sh           # Bridge to oca-reviewer
├── .config/
│   └── settings.env.example        # Example config (copy to settings.env)
├── .gitignore
├── LICENSE
└── README.md

Safety

  • Gitea-first: the bot will NOT reply on GitHub if the Gitea issue creation fails (so you never post a reply without a tracking link)
  • Dry-run by default: check shows everything that would happen; process executes for real
  • Secrets stay local: settings.env is gitignored; only .env.example is tracked

Contributing

Issues and PRs welcome at https://git.pop.coop/pop/oca-feedback

See also:

License

AGPL-3.0 — PopSolutions