Organization-level and global event rules #24

Merged
Gilles merged 15 commits from feat/19-org-global-rules into master 2026-10-29 07:06:39 +00:00
Owner

Closes #19

Frontend for argus/backend#21 (PR argus/backend#35). Stacked on #23 (base feat/18-stale-threshold-rules).

Changes

  • src/api/events.ts: rule helpers take a RuleScope ({owner, repo} / {org} / {} for global) instead of owner, repo; listEventRules(scope, inherited) adds ?include_inherited=1; EventRule.scope / scope_label.
  • EventRulesManager.vue: props owner+repo, org, or none (global). On a project it lists its own rules, then "Règles héritées" (organization and global rules) read-only with their origin; a rule without scope (older backend) counts as a project rule. Organization/global headers explain what the rules apply to; the "événements levés" link stays project-only.
  • Organization page: the organization's rule manager.
  • New GlobalRulesView at /settings/event-rules ("Réservé aux admins Argus" otherwise), linked in the header for Argus admins.
  • Default MSW handlers for organization/global rule endpoints; tests in src/__tests__/ScopedRules.spec.ts.

Checks

pnpm run test:unit (97 passed), vue-tsc -b, pnpm run build.

🤖 Generated with Claude Code

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA

Closes #19 Frontend for argus/backend#21 (PR argus/backend#35). **Stacked on #23** (base `feat/18-stale-threshold-rules`). ## Changes - `src/api/events.ts`: rule helpers take a `RuleScope` (`{owner, repo}` / `{org}` / `{}` for global) instead of `owner, repo`; `listEventRules(scope, inherited)` adds `?include_inherited=1`; `EventRule.scope` / `scope_label`. - `EventRulesManager.vue`: props `owner`+`repo`, `org`, or none (global). On a project it lists its own rules, then "Règles héritées" (organization and global rules) read-only with their origin; a rule without `scope` (older backend) counts as a project rule. Organization/global headers explain what the rules apply to; the "événements levés" link stays project-only. - Organization page: the organization's rule manager. - New `GlobalRulesView` at `/settings/event-rules` ("Réservé aux admins Argus" otherwise), linked in the header for Argus admins. - Default MSW handlers for organization/global rule endpoints; tests in `src/__tests__/ScopedRules.spec.ts`. ## Checks `pnpm run test:unit` (97 passed), `vue-tsc -b`, `pnpm run build`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
feature: organization-level and global event rules
All checks were successful
ci / unit (pull_request) Successful in 1m46s
ci / publish (pull_request) Has been skipped
84a19a5418
- The rule API helpers take a scope (project, organization or global)
  instead of owner/repo; EventRule gains scope/scope_label.
- EventRulesManager works for the three scopes: on a project it also
  lists the organization's and global rules that apply, read-only; the
  organization page gets its own rule manager.
- New "Règles globales" page (/settings/event-rules), linked in the
  header for Argus admins only.

Closes #19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Author
Owner
<!-- argus-link-bot:argus/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/argus/frontend/pr/24)
Merge branch 'feat/18-stale-threshold-rules' into feat/19-org-global-rules
Some checks failed
ci / unit (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
75db984c43
Merge branch 'feat/18-stale-threshold-rules' into feat/19-org-global-rules
All checks were successful
ci / unit (pull_request) Successful in 1m41s
ci / publish (pull_request) Has been skipped
442056f1ba
Merge branch 'feat/18-stale-threshold-rules' into feat/19-org-global-rules
All checks were successful
ci / unit (pull_request) Successful in 1m47s
ci / publish (pull_request) Has been skipped
4037427c79
Gilles changed target branch from feat/18-stale-threshold-rules to master 2026-10-29 06:59:47 +00:00
Merge branch 'master' into feat/19-org-global-rules
All checks were successful
ci / unit (pull_request) Successful in 1m39s
ci / publish (pull_request) Has been skipped
38a8139ae8
Gilles scheduled this pull request to auto merge when all checks succeed 2026-10-29 07:02:03 +00:00
Gilles merged commit 90e6ba0d04 into master 2026-10-29 07:06:39 +00:00
Gilles deleted branch feat/19-org-global-rules 2026-10-29 07:06:39 +00:00
Sign in to join this conversation.
No description provided.