Skip to content

Add configurable label normalization and event filtering - #69

Open
darthfork wants to merge 1 commit into
mainfrom
feat/issue-40-label-normalization
Open

Add configurable label normalization and event filtering#69
darthfork wants to merge 1 commit into
mainfrom
feat/issue-40-label-normalization

Conversation

@darthfork

Copy link
Copy Markdown
Owner

Summary

  • Closes Add configurable label normalization and event filtering #40 by adding an opt-in label policy so operators can filter repositories, branches, and workflows and optionally collapse branch labels into default / release / feature.
  • Filtered webhooks are still acknowledged and deduplicated; they skip business metrics/run state and increment promgithub_event_filtered_total.
  • Default scrape shape is unchanged. Helm values and usage docs cover the recommended production starting point.

Test plan

  • go test ./src and go test -tags=integration ./src
  • Start the service with no label-policy env vars and confirm workflow metrics still use raw branch="main"
  • Set PROMGITHUB_REPO_DENYLIST for a fixture repo and confirm /webhook returns 202 while promgithub_event_filtered_total{reason="repository"} increments
  • Set PROMGITHUB_NORMALIZE_BRANCHES=true and confirm main is exported as branch="default"
  • Set an invalid PROMGITHUB_BRANCH_ALLOW_REGEX and confirm the process fails at startup

Made with Cursor

Operators can bound metric cardinality with repo/branch/workflow filters and optional branch classes without changing the default scrape shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configurable label normalization and event filtering

1 participant