Skip to content

Jira/multi account support - #708

Closed
batoolfatima05 wants to merge 235 commits into
middlewarehq:mainfrom
Clustox:jira/multi-account-support
Closed

batoolfatima05 wants to merge 235 commits into
middlewarehq:mainfrom
Clustox:jira/multi-account-support

Conversation

@batoolfatima05

Copy link
Copy Markdown

Linked Issue(s)

Acceptance Criteria fulfillment

  • Task 1
  • Task 2
  • Task 3

Proposed changes (including videos or screenshots)

Further comments

hamad-clustox and others added 30 commits August 5, 2026 23:40
Baseline documentation for the Clustox fork of middlewarehq/middleware.

- ARCHITECTURE.md: system architecture covering the container and
  component model, data model, sync pipeline, DORA metric derivations,
  and known constraints. Every structural claim is reproducible via the
  commands in Appendix A.
- FORK_STRATEGY.md: upstream maintenance strategy -- remotes, branch
  model, the three-tier rule for where Clustox changes may live, the
  monthly sync runbook, and Apache 2.0 obligations.
- UPSTREAM_SYNC_LOG.md: ledger for recording each upstream merge.
- NOTICE: Apache 2.0 s4(d) attribution, absent upstream and required
  once a modified version is distributed.
- superpowers/specs + plans: design and implementation plan for
  authentication and role-based access control.

Two findings documented in detail:

- Two independent write paths reach the same database. The Next.js BFF
  goes directly to Postgres via knex in 23 files rather than through the
  Flask API, with its own hand-maintained schema copy in TypeScript.
- There is no authentication anywhere in the stack. next-auth is a
  dependency but is never configured: no route, no sign-in page.

Also documents the sync bookmark behaviour (ARCHITECTURE.md 7.5), where
a newly added repo silently syncs no history while the UI shows
"Calculating Dora" indefinitely.
CLUSTOX: new tables rather than columns on upstream's Users, so upstream
migrations can never collide with ours. Role values are constrained at
the database level via a CHECK, verified to reject invalid values
independently of the foreign key.

schema.sql regenerated by dbmate; the diff is purely additive.
bcryptjs rather than bcrypt: pure JS, no native compilation, so the
Docker build is unaffected. Cost factor 12.

verifyPassword swallows malformed-hash errors and returns false, so a
corrupt stored hash can never be mistaken for a successful comparison.
Authorization decisions live here so routes stay thin. Superadmin
short-circuits every team check without a query; admins are checked
against ClustoxUserTeamAccess per request rather than from the token,
so a permission change takes effect immediately.
JWT sessions carry userId and role only. Team assignments are read from
the database per request instead, so changing someone's teams takes
effect immediately rather than at next login.

Session lifetime 12h, no sliding renewal.
Upstream declared `authenticated: boolean = true` on Endpoint and
accepted an { unauthenticated: true } opt-out, but serve() never read
the flag. Five routes already opted out correctly, so the mechanism was
clearly intended to be enforced.

Reading it here covers all 47 BFF routes from one insertion point --
every real API route goes through Endpoint (the four non-Endpoint files
under pages/api are helper modules with no default export).

Test baseline: git_org_repos.test.ts and array.test.ts fail identically
on upstream's own global.ts and are unrelated to auth. Verified with
--runInBand; parallel workers give flaky counts on this suite.
Two corrections found during verification:

- middleware must NOT redirect /api/* requests. Endpoint.serve() already
  returns 401 for those, and redirecting an XHR to an HTML login page
  surfaces as a parse error rather than an auth failure.

- _app.tsx gated every page on auth.isInitialized, which AuthProvider
  sets only after a session fetch that now requires a session. That made
  the login page unreachable: the app waited forever for a login it would
  not render the form for. The gate is now bypassed on /login.

This makes _app.tsx an eighth modified upstream file, one more than the
plan estimated.
Two upstream files needed changes that the plan did not anticipate:

- next.config.js: knex resolves dialects dynamically, which webpack
  cannot bundle, so the instrumentation hook failed to compile and the
  bootstrap never ran. Fixed with serverExternalPackages: ['knex','pg'].
  API routes were unaffected, so this only surfaced once instrumentation
  started importing the db helper.

- ThirdPartyAuthContext.tsx: fetchSession had no .catch(), so the now-401
  session request rejected unhandled and buried the login page under a
  runtime error overlay. A 401 there is the expected unauthenticated
  case; it now falls through to the provider's existing
  onUnauthenticated path.

No default password: absent env vars log loudly and create nothing,
rather than falling back to a known value.

Verified end to end in a browser: unauthenticated request redirects to
/login, superadmin signs in, dashboards render with live data.
This is what makes the auth real rather than cosmetic. Before this,
curl http://localhost:9696/teams/<id>/lead_time returned full metrics
with no credentials, bypassing every guard added so far.

Fails closed: an unset INTERNAL_API_TOKEN rejects all requests rather
than allowing them. hmac.compare_digest avoids leaking the token
through response timing. Health endpoints stay exempt so container and
UI status probes keep working.

Cron needed its own path: it does not inherit the container environment,
so it now runs trigger_sync.sh which sources /app/.env and sends the
header. This was the highest-risk step -- a broken sync reports HTTP 200
regardless of outcome -- so it was verified by running the helper and
confirming a full sync completed.

Verified: direct :9696 and :9697 -> 403, health -> 200, correct token
-> 200, cron sync completes, dashboards still render in the browser.
155 pytest tests pass.
Deviation from the plan, deliberately: rather than adding an
assertTeamAccess call to each of the 18 team-scoped routes, the check
runs centrally in Endpoint.serve() whenever the payload carries a
team_id. One file instead of eighteen, and a newly added team route is
protected by default rather than depending on the author remembering.

Team list endpoints still need explicit filtering since they carry no
team_id, so index.ts and v2.ts filter through getAccessibleTeamIds.
Team creation and integration deletion are superadmin-only.

share.ts is no longer unauthenticated: it allowed anonymous POSTs that
inserted unbounded rows into URLShortenerData.

Verified live as an admin scoped to ZDA only:
  own team team_repos      -> 200
  other team team_repos    -> 403
  other team dora_metrics  -> 403
  team list                -> ['ZDA'] only

152 jest tests pass; the 2 failing suites fail identically on upstream.
Superadmin-only. Creates users with a role and team assignments, and
edits team scoping inline from the table.

Guards beyond the plan:
- duplicate email returns 409 rather than creating a shadow account
- a superadmin cannot demote themselves when they are the last one,
  which would leave the instance unadministerable through the UI
- 12-character minimum enforced in the yup schema, so the UI cannot
  create a weak account

The page derives its own authorisation from the API's 403 rather than
from AuthContext, whose role field is hardcoded to UserRole.MOM
upstream. That avoids another upstream edit and keeps the server as the
single source of truth.

Verified live: weak password 400, duplicate email 409, valid create 200,
admin gets 403 on the users API and sees 'Not authorised' on the page.
Playwright spec covers the redirect, credential rejection, 401 on
unauthenticated API calls, 403 on direct Flask access, and reachable
health endpoints.

The four request-level tests pass in the dev container. The three
page-level tests need Chromium system libraries the middleware-dev image
does not ship -- 'playwright install --with-deps' fails on this Debian
base -- so they are documented as host/CI-only. Every behaviour they
cover was verified manually against a real browser.

Docs corrected: the spec estimated six modified upstream files; the real
figure is 19 (12 carrying genuine logic changes). The estimate missed
every file that only reveals itself at runtime -- the _app.tsx auth gate,
the knex/webpack conflict, the unhandled session rejection, and the cron
path. The original estimate is kept alongside the correction because the
gap is the useful part.

UPSTREAM_SYNC_LOG.md now records the divergence baseline (19 modified,
26 new, 33 sentinels) so the first upstream merge has something to
check against.
A JWT proves only that someone signed in at some point. It says nothing
about whether the account still exists or still holds the role it had at
sign-in. getAuthSession trusted it for both.

Two consequences, one found by a user report:

- A deleted user kept a valid session. Team access was already read
  per-request, so they lost data (403) but stayed 'logged in' -- landing
  them in an app with no teams, no repos and no metrics. That reads as
  data loss, not as an auth failure.

- Role lived in the token, so demoting a superadmin left them with
  superadmin powers until the token expired, up to 12 hours.

Both now resolve from the database on every request, matching how team
access already worked. Leaving identity and role in the token while
reading team access live was an inconsistency in the original design.

Cost is one indexed lookup per request.

Verified against a live session for a user deleted mid-session: was
200 on /api/auth/session and 403 on team data, now 401 on both, so the
middleware redirects to login instead of showing an empty app.
Two gaps from the plan, both reported by the user. The plan specified a
/users page but never said how anyone would reach it, and never
addressed sign out at all -- upstream has no logout affordance because
it had no login.

- Sidebar footer shows who is signed in with their role, plus a Sign out
  button.
- 'Manage Users' nav item, hidden from non-superadmins.

Sidebar visibility reads the real role from a new /api/clustox/me
endpoint rather than AuthContext, whose role field upstream hardcodes to
UserRole.MOM. Hiding the item is presentation only; the API returns 403
regardless of what the sidebar shows.

Verified: superadmin sees Manage Users and the Superadmin chip, Sign out
redirects to /login. 156 jest tests pass.
Add Jenkinsfile for CI/CD pipeline
Records the gap between the shipped auth work (scoped by team) and the
multitenant model agreed in the first meeting (scoped by workspace),
the six open decisions, and cost estimates.

Decision received: Admins connect their own integrations.
Each ADMIN owns a workspace (an Organization); a SUPERADMIN owns none and
sits above all of them.

No schema change was needed. Upstream's Users.org_id already exists and
is already nullable, every other table already carries org_id, and
Integration is keyed on (name, org_id) -- so one GitHub account per
workspace is how the schema was already built. Upstream simply only ever
created a single Organization named 'default'.

- AuthSession carries orgId, resolved per-request from the database
  alongside identity and role
- createUser provisions a workspace for an ADMIN, or accepts an existing
  one so the pre-multitenancy workspace can be adopted rather than
  discarded
- SUPERADMIN is created with no workspace; the migration also clears the
  workspace from any existing superadmin, which would otherwise scope
  their view to it

42 auth tests pass.
Access now derives from workspace ownership rather than per-team grants.
An admin sees everything in the workspace they own and nothing outside
it; a superadmin sees across all of them.

- assertWorkspaceAccess gates any route carrying org_id
- assertTeamAccess resolves the team's workspace instead of consulting
  ClustoxUserTeamAccess, so an admin reaches every team in their own
  workspace without needing individual grants
- both run centrally in Endpoint.serve(), so a newly added route is
  scoped by default
- the BFF session returns the caller's own workspace; upstream took
  whichever Organization came back first, correct only while one existed
- a missing team is refused rather than 404'd, so an admin cannot probe
  for team ids outside their workspace

ClustoxUserTeamAccess is left in place unused. Sub-workspace scoping can
be reinstated later without a migration if a workspace grows enough to
need it.

Verified live with two workspaces:
  superadmin session         -> no workspace
  create admin               -> new workspace provisioned
  admin session              -> own workspace, no integrations
  admin -> other workspace   -> 403 (teams, team data, users api)
  superadmin -> both         -> 200, sees all teams in each

163 jest and 155 pytest tests pass.
Regression from the previous commit. A superadmin owns no workspace, so
session.org was null, integrationList was empty, and the sidebar filter
collapsed to just 'Manage Integrations' while the router forced them
onto that page. The app looked unconfigured.

The whole UI is workspace-scoped, so a superadmin needs a workspace to
look at even though they own none:

- /api/clustox/workspaces lists all workspaces and records a selection
- the session resolves that selection, falling back to the oldest
  workspace, and ignores a stale one that no longer exists
- a workspace switcher in the sidebar footer, superadmin only
- superadmin is exempt from the onboarding redirects and the
  integration-required sidebar filter, which describe a workspace they
  are merely viewing

The selection is viewing context only. Guards never consult it -- a
superadmin passes every workspace check regardless of what is selected.
Two problems, both reported from actual use.

The sidebar and header were missing because the page never used
PageWrapper, which is where every other page gets its chrome. Setting
getLayout to ExtendedSidebarLayout alone was not enough.

The table was also stale: it still showed a Teams column with an empty
dropdown, left over from the pre-multitenancy model. Under tenancy an
admin belongs to a workspace, not to a list of teams, so the column was
both meaningless and misleading -- the one fact this page exists to show
was the one it did not show.

Rebuilt around the current model:
- Workspace column, rendered monospaced so tenancy reads as data
- superadmins show 'All workspaces' rather than an empty cell
- add-user moved into a dialog; the inline five-field row was cramped
  and permanently on screen for an occasional action
- the role toggle explains what each role actually gets, since the
  difference is workspace ownership and that is not self-evident
- password validation gives a live character count instead of failing
  on submit
- role changes moved to a row menu, with the last-superadmin refusal
  surfaced as a message rather than a silent no-op
- empty state, and counts of admins and workspaces

165 tests pass.
An admin creating a GitHub integration got a 403. The request was going
to /api/resources/orgs/undefined/integration -- the client had no
workspace id to send.

Root cause was the client, not the API: the modal read orgId from redux,
which redux-persist rehydrates from the previous session. During the
window where a superadmin's session legitimately returned no workspace,
that empty value was persisted and survived into the next login.

- /api/clustox/me now returns the caller's workspace, resolved
  server-side per request and never persisted
- both provider modals prefer it over the redux copy, and refuse to
  submit without a workspace rather than posting 'undefined'

Also corrected the order of checks in Endpoint.serve(). Workspace and
team scoping ran before schema validation, so a malformed org id
surfaced as an opaque 403 instead of a 400 naming the bad field. That
made this take far longer to diagnose than it should have. Validation
now runs first.

Verified live as an admin:
  link to own workspace     -> 200, stored against their workspace
  link to another workspace -> 403
  malformed workspace id    -> 400 (was 403)

Each workspace now holds its own GitHub integration, which is what
Integration's (name, org_id) key was always designed for.
…s-tenant hole

Creating a team in your own workspace returned 403. I had restricted
team creation and integration removal to superadmins, which was right
under the old shared-workspace model and wrong under this one: an admin
owns their workspace, so teams and integrations inside it are theirs to
manage. Shahzad confirmed admins connect their own integrations.

Both restrictions removed. The central check on org_id already confines
an admin to their own workspace, which is the control that matters.

Removing them surfaced a worse problem. teams/v2 names the team 'id',
not 'team_id', so the central team scoping never saw it. An admin could
pass their own org_id in the path -- satisfying the workspace check --
together with a team id from another workspace, and edit or delete it.
PATCH and DELETE now assert team access explicitly.

That is the cost of a central guard keyed on a parameter name: it covers
everything that follows the convention and silently misses everything
that does not.

Verified live as an admin:
  create team in own workspace          -> 200
  create team in another workspace      -> 403
  delete another workspace's team via
    own org_id in the path              -> 403, target team untouched

165 tests pass.
batoolfatima05 and others added 27 commits August 24, 2026 17:06
The previous commit (preserve Jira token encryption keys at startup)
added a good safety check -- refuse to start rather than silently
regenerate keys over a present-but-corrupt config.ini, which would
orphan already-encrypted provider tokens -- but in doing so removed
the *only* mechanism that ever populated SECRET_PUBLIC_KEY/
SECRET_PRIVATE_KEY as environment variables for the frontend process.

web-server/src/utils/auth-supplementary.ts's enc()/dec() (used by
every provider link -- Jira, GitHub, GitLab) reads these via
process.env, not from config.ini directly, unlike the Python backend.
With no export step at all, that lookup is undefined on every boot,
not just subsequent ones, so linking any provider fails outright
before the request ever reaches the provider's API. This restores the
export -- directly into the current shell via `export "$key=$value"`
rather than the old ~/.bashrc round-trip, which is simpler and avoids
the file-based indirection -- after the corruption check, so both
concerns are addressed: never silently regenerate/corrupt keys, and
the web-server actually receives the ones already on disk.

Verified empirically (not just by re-reading the script) that a
plain `KEY=value` line only becomes a local shell variable and is
invisible to a child process unless `export`-ed in the same shell
before that child is spawned.
fix: restore env-var export for the Node web-server's encryption keys
…pelines

Two sequential PRs from one design: code provider first (lead time,
LOC, contributor filter, revert incidents), Pipelines as a deployment
source second. Cloud v2 API, Atlassian API token via Basic auth,
server-side validation, 429-as-pause with bookmark resume.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Seven tasks: v2 client, ETL handler, activity/diffstat/429 contract,
revert detection + registration, BFF token check + repo listing, the
modal, and provider-isolation regression with a live-verification gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Basic auth (email, Atlassian API token) on the session -- never in a
header string or URL. Pagination follows Bitbucket's next-link scheme.
The PR listing names every state explicitly: without it the API returns
only open PRs and every merged PR silently vanishes from lead time.
429 raises BitbucketRateLimitExceeded carrying Retry-After; the ETL
handler owns pause-and-resume policy, since only it knows what has been
safely stored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors GitlabETLHandler against the CodeProviderETLHandler contract.
DECLINED and SUPERSEDED fold into CLOSED; an unknown state skips that
PR, never the batch. state_changed_at for merged PRs is updated_on --
Bitbucket has no merged_at anywhere in the PR object.

Author is the nickname with uuid fallback, correcting the spec: the
contributor dropdown lists author strings verbatim and the schema has
no display indirection, so a stored uuid would surface as '{a1b2...}'
in the UI. The uuid stays in data for a future identity layer.

Repo listing is one workspace call with uuid match-back rather than a
call per repo -- N repos cost 1 request against a ~1,000/hr ceiling.

Reviewers: create_pr_metrics rebuilds them from review events on every
non-open PR (shared analytics contract, same as GitHub/GitLab); the
participants list serves OPEN PRs. Tests pin both paths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The handler behaviours landed with Task 2's mirror; these tests pin
them and were mutation-checked to prove they bite: turning the 429
break into continue fails three tests, and returning zeros from a
failed diffstat instead of omitting code_stats fails one.

Event states are asserted via PullRequestEventState values -- the
analytics layer compares data['state'] against the lowercase enum
values, so literal-case assertions are the contract, not cosmetics.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Detection keys on Bitbucket's own revert branch convention,
revert-pr-<number> -- a structured link to the original PR, matched in
both sync directions like GitLab's revert-<hash> handler. The spec's
title-prefix heuristic was dropped as strictly inferior, not weakened:
a title names no target, and a mapping without both ends is useless to
CFR. Spec corrected.

A factory test pins every CodeProvider value to a CodeETLFactory
branch -- an enum value without one fails at sync time as a
NotImplementedError in a scheduler log nobody reads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The token check runs in the BFF because api.bitbucket.org sends no CORS
headers for Basic auth from foreign origins -- a browser-direct check
dies in preflight. The reply is a boolean and a nickname; the token is
never logged, persisted, or echoed.

Repo listing threads Bitbucket's opaque next-page URL through the
shared cursor field, and the adapter lives in an import-light util so
its test does not drag Endpoint -> next-auth's ESM build into jest --
the same wall benchmarks.ts was written around.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Email + API token modal validated through the BFF check; the email
rides to provider_meta, which the sync factory reads back as the Basic
auth username -- the modal test pins that exact linkProvider shape.

The integration card is generated from the Gitlab card with provider
identifiers swapped; a bitbucket.svg already shipped in mocks/icons and
the ambient IntegrationsMap already carried the bitbucket key upstream.

Also fixes the gap the plan missed: CODE_INTEGRATION_BUCKET decides
which orgs the scheduler syncs at all, and it listed only GitHub and
GitLab -- a linked Bitbucket org would never sync, with no error
anywhere. Same defect class the Jenkins integration shipped. A test now
pins every CodeProvider value into the bucket, alongside Task 4's
factory pin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Backend: an org with only GitHub linked still gets exactly ['github']
from the scheduler's provider lookup -- the bucket gaining a third
entry changes no existing org's sync plan.

Frontend: the card reads integrations.bitbucket only; a workspace with
GitHub and GitLab linked sees Bitbucket unlinked, inheriting nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first real linking attempt failed with the catch-all message. Two
causes were indistinguishable: wrong credentials, and a scoped
Atlassian token created without the account read scope -- which works
against repositories but fails /2.0/user, the exact call the sync's
validity check makes. The check endpoint now probes /2.0/workspaces on
failure to tell them apart, and the modal names the missing scope.

Both fields are trimmed at submission: a token copied from Atlassian's
UI often carries a trailing newline, which corrupts the Basic auth pair
into a 401 that reads exactly like a wrong token.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… autofill

GET /2.0/workspaces returns 410 'CHANGE-2770 - Functionality has been
deprecated'. Every fixture test passed against an endpoint that no
longer exists; only the live gate caught it. get_workspaces now uses
/2.0/user/permissions/workspaces, with a test pinning the URL. Note:
scoped API tokens cannot enumerate workspaces at all (404 there too) --
workspace-addressed endpoints work fine, so sync is unaffected; the
repo-picker UI will need a workspace-slug input as a follow-up.

Both modal fields get autoComplete='new-password': Chrome's password
manager silently replaced pasted values with saved logins during live
testing -- the dots looked right and the pair failed as 'invalid
credentials'.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
C1 (security): the Bitbucket pagination cursor is a client-supplied URL
fetched server-side with the org's Basic auth header -- unvalidated, it
was an SSRF exfiltrating the Atlassian token to any host a workspace
member named. Cursors must now be prefix-anchored to Bitbucket's API.

C2: Number(idempotency_key) turned Bitbucket's brace-uuid keys into NaN
in the team edit UI; the next save persisted 'NaN', silently killing
that repo's sync and making it un-removable. Non-numeric keys now pass
through verbatim.

I1: the missing-scope diagnostic probed /2.0/workspaces -- the endpoint
this branch itself found dead -- making the reason unreachable. A 403
from /2.0/user is the real scope signal.

I2: token-check's fetch is wrapped so a network error degrades cleanly
instead of reaching the global handler, which logs the whole request,
token included.

I3: a 429 during check_pat surfaced as 'token is invalid, revoked or
expired' at sync start -- in exactly the resume window a 429 pause
creates. It now raises the rate-limit error it is.

Minors: approval event keys use the stable account uuid (nickname
renames duplicated events on re-sync); OPEN PRs get state_changed_at
None matching GitHub; a re-sync whose diffstat fails keeps previously
stored code_stats instead of erasing them; canonical workspace slug for
parent; Error cause bag; spec staleness.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bitbucket Cloud as a code provider (phase 1)
A team save 500'd for any repo another workspace already tracked --
repo-specific, deterministic, and permanent. Root cause: OrgRepo carried
two unique constraints without org_id (idempotency_key alone, and
org_name+name+provider), and the repo lookup in update_org_repos was
global, so the second workspace found the first workspace's row and hit
upstream's cross-org 'Data integrity error' raise.

The lookup is now org-scoped, the unreachable raise is gone, and the
migration rescopes both constraints per org -- strictly weaker, so
existing data needs no fix-up. Live-verified locally: the same GitHub
repo saved into a second org cleanly, one row per workspace.

The second constraint was caught by the live repro, not code reading:
with only the idempotency constraint scoped, the insert died on
one_repo_per_provider instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
signOut({ callbackUrl: '/login' }) resolves the relative URL server-side
against NEXTAUTH_URL, which on the server is not the public domain. The
redirect now happens client-side against the actual origin, after
signOut({ redirect: false }) clears the session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fix cross-workspace repo collision: scope OrgRepo uniqueness per org
Mirrors the setup already running on hrms, qa-process-automation and
be-automation, adapted to this repo.

Placed between Verify Environment and Build, so the gate can actually stop a
release -- this pipeline deploys, unlike the QC automation jobs where the scan
runs after the work. Verify Environment still runs first so a missing .env
variable fails fast and cheaply, before a scan is spent, keeping the existing
"fail before anything is torn down" ordering intact.

- SonarQube Analysis: runs the sonar-scanner CLI via the official
  sonarsource/sonar-scanner-cli image inside withSonarQubeEnv('MySonarQube').
  The agent has Docker but no sonar-scanner on PATH and no SonarQube Scanner
  tool installation, so the image avoids adding global tool config.
  sonar.working.directory is redirected into the bind-mounted workspace: the
  image's baked-in /tmp/.scannerwork is owned by uid 1000 and unwritable under
  -u, and the override also lands report-task.txt where waitForQualityGate
  looks for it.
- Quality Gate: waitForQualityGate(abortPipeline: true) inside a 5 minute
  timeout, so a missed webhook cannot hold the deploy hostage.
- Fetch Sonar Issues / Publish Issue Report: paginates api/issues/search and
  renders the result on the build page via warnings-ng. Both wrapped in
  catchError(buildResult: 'UNSTABLE') so reporting cannot fail a deploy that
  already passed the gate. The merged JSON keeps the top-level total/p/ps
  fields, without which the warnings-ng parser fails format detection and
  silently reports zero issues.

sonar-project.properties is new. This is a polyglot monorepo (282 Python, 266
TS, 188 TSX), so sources are listed explicitly to keep media_files/,
database-docker/ and docs/ out. backend/analytics_server/tests and
cli/source/__tests__ sit inside source roots, so they are excluded from main
and declared as tests instead -- without that the scan fails outright with
"file can't be indexed twice".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: add SonarQube analysis, quality gate and issue report
…elated fixes

Implements docs/JIRA_MULTI_ACCOUNT_PLAN.md end to end:

- Task 1-2: JiraConnection + OrgProjectConnection schema and repo/service
  layer (create/list/get/delete/set-default, encrypted tokens, delete
  blocked while referenced, default-switch atomicity).
- Task 3: Flask + Next.js API endpoints for managing connections, proxied
  through the backend so business rules live in one place.
- Task 4: connection-aware sync -- JiraETLHandler loops JiraConnection
  rows (falling back to the legacy Integration row when none exist),
  scoped ticket idempotency keys, fixed get_org_providers so a
  connection-only org actually syncs.
- Task 5: PR<->ticket matching scoped by connection for the rare
  colliding-key case, without changing the default org-wide matching
  behavior for every ordinary org.
- Task 6: connections management UI folded into the existing Jira card
  (not a second card), site-URL normalization (a pasted
  "https://x.atlassian.net/" was being stored verbatim and building an
  unreachable URL at search/sync time), and a connection picker for
  per-team Jira project search/save (jira_project_search.ts,
  team_projects.ts), closing the OrgProjectConnection write-side gap
  from Task 4.

Also, found while verifying against a 15-scenario Jira<->PR<->deployment
spec:

- PR<->ticket matching now scans only the PR title (previously also
  scanned branch name and description) -- the PR title is the sole
  authoritative source per that spec; branch/description/commit are
  never used as a fallback.
- New TeamRepoProjectMapping: an explicit, informational repo<->Jira-
  project pairing per team (never affects matching/sync/metrics).
- Team creation no longer hard-requires a Git repo -- an opt-in
  "Jira-only, no Git repo" checkbox lets an org with only Jira create a
  team, without changing the default repo-required flow for anyone who
  doesn't check it.
- DoraMetricsBody's empty-state check no longer ignores Jira ticket-
  cycle-time data -- a repo-less team with real ticket data was always
  falling into "configure team repos" instead of showing it.
- Fixed a real, live bug: teams/v2.ts's default code-provider list
  omitted Bitbucket in two places, undercounting a team's repos on the
  team list and leaving its edit-form repo picker empty even when a
  Bitbucket repo was genuinely linked and its metrics were computing
  correctly.

Backend: 567 tests passing, flake8/black clean. Frontend: tsc --noEmit
clean; new/touched test files verified individually (this environment's
memory constraints made a single combined jest run unreliable, noted in
the plan doc).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 3 committers have signed the CLA.

❌ ameernexus1
❌ batoolfatima05
❌ hamad-clustox
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 387 files, which is 237 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 6b726401-c33c-44bd-b4f2-53a776815d07

📥 Commits

Reviewing files that changed from the base of the PR and between 844eb42 and 9da2b6b.

⛔ Files ignored due to path filters (1)
  • web-server/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (387)
  • Dockerfile.dev
  • Jenkinsfile
  • NOTICE
  • backend/analytics_server/app.py
  • backend/analytics_server/mhq/api/integrations.py
  • backend/analytics_server/mhq/api/pull_requests.py
  • backend/analytics_server/mhq/api/request_utils.py
  • backend/analytics_server/mhq/api/resources/code_resouces.py
  • backend/analytics_server/mhq/api/resources/project_resources.py
  • backend/analytics_server/mhq/api/resources/settings_resource.py
  • backend/analytics_server/mhq/api/resources/sprint_resources.py
  • backend/analytics_server/mhq/api/resources/ticket_insights_resources.py
  • backend/analytics_server/mhq/api/resources/ticket_lead_time_resources.py
  • backend/analytics_server/mhq/api/settings.py
  • backend/analytics_server/mhq/api/sync.py
  • backend/analytics_server/mhq/api/teams.py
  • backend/analytics_server/mhq/clustox_auth/__init__.py
  • backend/analytics_server/mhq/clustox_auth/internal_token.py
  • backend/analytics_server/mhq/clustox_auth/sync_run.py
  • backend/analytics_server/mhq/exapi/bitbucket.py
  • backend/analytics_server/mhq/exapi/jenkins.py
  • backend/analytics_server/mhq/exapi/jira.py
  • backend/analytics_server/mhq/exapi/models/bitbucket.py
  • backend/analytics_server/mhq/exapi/models/jira.py
  • backend/analytics_server/mhq/service/bookmark/bookmark.py
  • backend/analytics_server/mhq/service/bookmark/bookmark_types.py
  • backend/analytics_server/mhq/service/code/integration.py
  • backend/analytics_server/mhq/service/code/lead_time.py
  • backend/analytics_server/mhq/service/code/loc.py
  • backend/analytics_server/mhq/service/code/models/ticket_lead_time.py
  • backend/analytics_server/mhq/service/code/repository_service.py
  • backend/analytics_server/mhq/service/code/sync/etl_bitbucket_handler.py
  • backend/analytics_server/mhq/service/code/sync/etl_code_factory.py
  • backend/analytics_server/mhq/service/code/sync/revert_prs_bitbucket_sync.py
  • backend/analytics_server/mhq/service/code/ticket_lead_time.py
  • backend/analytics_server/mhq/service/incidents/integration.py
  • backend/analytics_server/mhq/service/incidents/sync/etl_incidents_factory.py
  • backend/analytics_server/mhq/service/incidents/sync/etl_jira_incidents_handler.py
  • backend/analytics_server/mhq/service/project/__init__.py
  • backend/analytics_server/mhq/service/project/integration.py
  • backend/analytics_server/mhq/service/project/models/org_project.py
  • backend/analytics_server/mhq/service/project/repository_service.py
  • backend/analytics_server/mhq/service/project/sync/__init__.py
  • backend/analytics_server/mhq/service/project/sync/etl_handler.py
  • backend/analytics_server/mhq/service/project/sync/etl_jira_handler.py
  • backend/analytics_server/mhq/service/project/sync/etl_project_factory.py
  • backend/analytics_server/mhq/service/project/sync/etl_provider_handler.py
  • backend/analytics_server/mhq/service/settings/benchmarks.py
  • backend/analytics_server/mhq/service/settings/configuration_settings.py
  • backend/analytics_server/mhq/service/settings/default_settings_data.py
  • backend/analytics_server/mhq/service/settings/models.py
  • backend/analytics_server/mhq/service/settings/setting_type_validator.py
  • backend/analytics_server/mhq/service/sprints/__init__.py
  • backend/analytics_server/mhq/service/sprints/service.py
  • backend/analytics_server/mhq/service/sync_data.py
  • backend/analytics_server/mhq/service/ticket_insights/__init__.py
  • backend/analytics_server/mhq/service/ticket_insights/cycle_time.py
  • backend/analytics_server/mhq/service/ticket_insights/service.py
  • backend/analytics_server/mhq/service/ticket_matching/__init__.py
  • backend/analytics_server/mhq/service/ticket_matching/matcher.py
  • backend/analytics_server/mhq/service/ticket_matching/service.py
  • backend/analytics_server/mhq/service/workflows/integration.py
  • backend/analytics_server/mhq/service/workflows/sync/etl_jenkins_handler.py
  • backend/analytics_server/mhq/service/workflows/sync/etl_workflows_factory.py
  • backend/analytics_server/mhq/service/workflows/workflow_filter.py
  • backend/analytics_server/mhq/store/models/code/enums.py
  • backend/analytics_server/mhq/store/models/code/filter.py
  • backend/analytics_server/mhq/store/models/code/pull_requests.py
  • backend/analytics_server/mhq/store/models/code/workflows/enums.py
  • backend/analytics_server/mhq/store/models/code/workflows/filter.py
  • backend/analytics_server/mhq/store/models/incidents/enums.py
  • backend/analytics_server/mhq/store/models/integrations/__init__.py
  • backend/analytics_server/mhq/store/models/integrations/enums.py
  • backend/analytics_server/mhq/store/models/integrations/jira_connection.py
  • backend/analytics_server/mhq/store/models/projects/__init__.py
  • backend/analytics_server/mhq/store/models/projects/repository.py
  • backend/analytics_server/mhq/store/models/projects/sprints.py
  • backend/analytics_server/mhq/store/models/projects/tickets.py
  • backend/analytics_server/mhq/store/models/settings/configuration_settings.py
  • backend/analytics_server/mhq/store/models/settings/enums.py
  • backend/analytics_server/mhq/store/models/team_repo_project_mapping/__init__.py
  • backend/analytics_server/mhq/store/models/team_repo_project_mapping/mapping.py
  • backend/analytics_server/mhq/store/models/ticket_matching/__init__.py
  • backend/analytics_server/mhq/store/models/ticket_matching/mapping.py
  • backend/analytics_server/mhq/store/repos/code.py
  • backend/analytics_server/mhq/store/repos/core.py
  • backend/analytics_server/mhq/store/repos/incidents.py
  • backend/analytics_server/mhq/store/repos/jira_connection.py
  • backend/analytics_server/mhq/store/repos/projects.py
  • backend/analytics_server/mhq/store/repos/team_repo_project_mapping.py
  • backend/analytics_server/mhq/store/repos/ticket_matching.py
  • backend/analytics_server/mhq/store/repos/workflows.py
  • backend/analytics_server/mhq/utils/jenkins.py
  • backend/analytics_server/mhq/utils/string.py
  • backend/analytics_server/sync_app.py
  • backend/analytics_server/tests/api/__init__.py
  • backend/analytics_server/tests/api/resources/__init__.py
  • backend/analytics_server/tests/api/resources/test_sprint_resources.py
  • backend/analytics_server/tests/api/resources/test_ticket_insights_resources.py
  • backend/analytics_server/tests/api/resources/test_ticket_lead_time_resources.py
  • backend/analytics_server/tests/api/test_benchmark_routes.py
  • backend/analytics_server/tests/api/test_jenkins_routes.py
  • backend/analytics_server/tests/api/test_jira_connections_routes.py
  • backend/analytics_server/tests/clustox_auth/__init__.py
  • backend/analytics_server/tests/clustox_auth/test_internal_token.py
  • backend/analytics_server/tests/clustox_auth/test_sync_run.py
  • backend/analytics_server/tests/exapi/test_bitbucket_api.py
  • backend/analytics_server/tests/exapi/test_jenkins.py
  • backend/analytics_server/tests/exapi/test_jira.py
  • backend/analytics_server/tests/factories/models/exapi/jenkins.py
  • backend/analytics_server/tests/service/Incidents/sync/test_etl_jira_incidents_handler.py
  • backend/analytics_server/tests/service/Incidents/test_integration.py
  • backend/analytics_server/tests/service/Incidents/test_mean_time_to_recovery.py
  • backend/analytics_server/tests/service/bookmark/__init__.py
  • backend/analytics_server/tests/service/bookmark/test_bookmark.py
  • backend/analytics_server/tests/service/code/sync/test_etl_bitbucket_handler.py
  • backend/analytics_server/tests/service/code/sync/test_revert_pr_bitbucket_sync.py
  • backend/analytics_server/tests/service/code/test_contributors.py
  • backend/analytics_server/tests/service/code/test_lead_time_service.py
  • backend/analytics_server/tests/service/code/test_loc.py
  • backend/analytics_server/tests/service/code/test_repository_service.py
  • backend/analytics_server/tests/service/code/test_ticket_lead_time.py
  • backend/analytics_server/tests/service/project/__init__.py
  • backend/analytics_server/tests/service/project/sync/__init__.py
  • backend/analytics_server/tests/service/project/sync/test_etl_jira_handler.py
  • backend/analytics_server/tests/service/project/test_repository_service.py
  • backend/analytics_server/tests/service/settings/__init__.py
  • backend/analytics_server/tests/service/settings/test_benchmark_setting_type.py
  • backend/analytics_server/tests/service/settings/test_benchmarks.py
  • backend/analytics_server/tests/service/settings/test_configuration_settings.py
  • backend/analytics_server/tests/service/settings/test_default_settings_data.py
  • backend/analytics_server/tests/service/sprints/__init__.py
  • backend/analytics_server/tests/service/sprints/test_service.py
  • backend/analytics_server/tests/service/ticket_insights/__init__.py
  • backend/analytics_server/tests/service/ticket_insights/test_cycle_time.py
  • backend/analytics_server/tests/service/ticket_insights/test_service.py
  • backend/analytics_server/tests/service/ticket_matching/__init__.py
  • backend/analytics_server/tests/service/ticket_matching/test_matcher.py
  • backend/analytics_server/tests/service/ticket_matching/test_service.py
  • backend/analytics_server/tests/service/workflows/sync/test_etl_handler.py
  • backend/analytics_server/tests/service/workflows/sync/test_etl_jenkins_handler.py
  • backend/analytics_server/tests/service/workflows/sync/test_etl_workflows_factory.py
  • backend/analytics_server/tests/store/__init__.py
  • backend/analytics_server/tests/store/models/__init__.py
  • backend/analytics_server/tests/store/models/code/__init__.py
  • backend/analytics_server/tests/store/models/code/test_pr_filter_authors.py
  • backend/analytics_server/tests/store/models/code/test_pull_requests.py
  • backend/analytics_server/tests/store/models/code/workflows/__init__.py
  • backend/analytics_server/tests/store/models/code/workflows/test_workflow_filter_actors.py
  • backend/analytics_server/tests/store/models/code/workflows/test_workflow_filter_null_branches.py
  • backend/analytics_server/tests/store/repos/__init__.py
  • backend/analytics_server/tests/store/repos/test_contributors_query.py
  • backend/analytics_server/tests/store/repos/test_incidents_org_scoping.py
  • backend/analytics_server/tests/store/repos/test_jira_connection.py
  • backend/analytics_server/tests/store/repos/test_projects_connection_scoping.py
  • backend/analytics_server/tests/store/repos/test_team_repo_project_mapping.py
  • backend/analytics_server/tests/store/repos/test_ticket_matching.py
  • backend/analytics_server/tests/utils/time/test_fill_missing_week_buckets.py
  • backend/requirements.txt
  • database-docker/db/migrations/20260805150000_clustox_auth.sql
  • database-docker/db/migrations/20260806120000_clustox_multitenancy.sql
  • database-docker/db/migrations/20260806160000_clustox_sync_runs.sql
  • database-docker/db/migrations/20260806180000_clustox_invites.sql
  • database-docker/db/migrations/20260807200000_clustox_invite_emailed.sql
  • database-docker/db/migrations/20260811120000_clustox_jira_projects.sql
  • database-docker/db/migrations/20260811130000_clustox_jira_tickets.sql
  • database-docker/db/migrations/20260811140000_clustox_pr_ticket_matching.sql
  • database-docker/db/migrations/20260812150000_clustox_jira_sprints.sql
  • database-docker/db/migrations/20260813120000_clustox_jira_incident_source_unconditional.sql
  • database-docker/db/migrations/20260902090000_org_scoped_idempotency_key.sql
  • database-docker/db/migrations/20260909120000_clustox_jira_multi_account.sql
  • database-docker/db/migrations/20260910100000_clustox_team_repo_project_mapping.sql
  • database-docker/db/schema.sql
  • docker-compose.prod.yml
  • docs/ARCHITECTURE.md
  • docs/BENCHMARKS.md
  • docs/BENCHMARKS_PLAN.md
  • docs/BENCHMARK_GRAPHS_AND_LOC.md
  • docs/BENCHMARK_GRAPHS_AND_LOC_PLAN.md
  • docs/BITBUCKET.md
  • docs/BITBUCKET_PLAN.md
  • docs/CONTRIBUTOR_FILTER_PLAN.md
  • docs/FORK_STRATEGY.md
  • docs/JENKINS_INTEGRATION.md
  • docs/JENKINS_INTEGRATION_PLAN.md
  • docs/JIRA_MULTI_ACCOUNT_PLAN.md
  • docs/MULTITENANCY_PROPOSAL.md
  • docs/UPSTREAM_SYNC_LOG.md
  • env.example
  • setup_utils/cronjob.txt
  • setup_utils/start.sh
  • setup_utils/trigger_sync.sh
  • sonar-project.properties
  • web-server/e2e/auth.spec.ts
  • web-server/e2e/benchmarks.spec.ts
  • web-server/e2e/invites.spec.ts
  • web-server/e2e/jenkins.spec.ts
  • web-server/e2e/jira-incident-source.spec.ts
  • web-server/e2e/jira-integration.spec.ts
  • web-server/e2e/multitenancy.spec.ts
  • web-server/instrumentation.ts
  • web-server/jest.config.js
  • web-server/jest.setup.after-env.js
  • web-server/libdefs/ambient.d.ts
  • web-server/libdefs/jest-dom.d.ts
  • web-server/middleware.ts
  • web-server/next.config.js
  • web-server/package.json
  • web-server/pages/_app.tsx
  • web-server/pages/accept-invite.tsx
  • web-server/pages/api/auth/[...nextauth].ts
  • web-server/pages/api/auth/session.ts
  • web-server/pages/api/clustox/accept-invite.ts
  • web-server/pages/api/clustox/benchmarks/global.ts
  • web-server/pages/api/clustox/invites/[invite_id].ts
  • web-server/pages/api/clustox/invites/index.ts
  • web-server/pages/api/clustox/jenkins/jobs.ts
  • web-server/pages/api/clustox/jenkins/mappings.ts
  • web-server/pages/api/clustox/me.ts
  • web-server/pages/api/clustox/overview.ts
  • web-server/pages/api/clustox/sync-now.ts
  • web-server/pages/api/clustox/users/[user_id].ts
  • web-server/pages/api/clustox/users/index.ts
  • web-server/pages/api/clustox/workspace-status.ts
  • web-server/pages/api/clustox/workspaces.ts
  • web-server/pages/api/integrations/index.ts
  • web-server/pages/api/integrations/integrations-map.ts
  • web-server/pages/api/integrations/jira/__tests__/validate.test.ts
  • web-server/pages/api/integrations/jira/validate.ts
  • web-server/pages/api/internal/[org_id]/__tests__/jira_project_search.test.ts
  • web-server/pages/api/internal/[org_id]/git_org_repos.ts
  • web-server/pages/api/internal/[org_id]/jira_project_search.ts
  • web-server/pages/api/internal/[org_id]/utils.ts
  • web-server/pages/api/internal/bitbucket/token-check.ts
  • web-server/pages/api/internal/team/[team_id]/__tests__/sprints.test.ts
  • web-server/pages/api/internal/team/[team_id]/__tests__/ticket_insights.test.ts
  • web-server/pages/api/internal/team/[team_id]/__tests__/unlinked_prs.test.ts
  • web-server/pages/api/internal/team/[team_id]/contributors.ts
  • web-server/pages/api/internal/team/[team_id]/dora_metrics.ts
  • web-server/pages/api/internal/team/[team_id]/sprints.ts
  • web-server/pages/api/internal/team/[team_id]/ticket_insights.ts
  • web-server/pages/api/internal/team/[team_id]/ticket_lead_time.ts
  • web-server/pages/api/internal/team/[team_id]/unlinked_prs.ts
  • web-server/pages/api/resources/__tests__/team_projects.test.ts
  • web-server/pages/api/resources/__tests__/team_repo_project_mappings.test.ts
  • web-server/pages/api/resources/orgs/[org_id]/jira-connections/[connection_id].ts
  • web-server/pages/api/resources/orgs/[org_id]/jira-connections/__tests__/[connection_id].test.ts
  • web-server/pages/api/resources/orgs/[org_id]/jira-connections/__tests__/index.test.ts
  • web-server/pages/api/resources/orgs/[org_id]/jira-connections/index.ts
  • web-server/pages/api/resources/orgs/[org_id]/teams/index.ts
  • web-server/pages/api/resources/orgs/[org_id]/teams/v2.ts
  • web-server/pages/api/resources/share.ts
  • web-server/pages/api/resources/team_projects.ts
  • web-server/pages/api/resources/team_repo_project_mappings.ts
  • web-server/pages/dora-metrics/index.tsx
  • web-server/pages/integrations.tsx
  • web-server/pages/login.tsx
  • web-server/pages/settings.tsx
  • web-server/pages/teams/index.tsx
  • web-server/pages/users.tsx
  • web-server/pages/workspaces.tsx
  • web-server/src/api-helpers/__tests__/dora-metrics-additive.test.ts
  • web-server/src/api-helpers/__tests__/endpoint-auth.test.ts
  • web-server/src/api-helpers/__tests__/endpoint-team-scope.test.ts
  • web-server/src/api-helpers/axios.ts
  • web-server/src/api-helpers/global.ts
  • web-server/src/api-helpers/internal-error.ts
  • web-server/src/api-helpers/team.ts
  • web-server/src/auth/__tests__/bootstrap.test.ts
  • web-server/src/auth/__tests__/guard.test.ts
  • web-server/src/auth/__tests__/password.test.ts
  • web-server/src/auth/__tests__/queries.test.ts
  • web-server/src/auth/__tests__/session.test.ts
  • web-server/src/auth/__tests__/workspace-guard.test.ts
  • web-server/src/auth/bootstrap.ts
  • web-server/src/auth/guard.ts
  • web-server/src/auth/invites.ts
  • web-server/src/auth/password.ts
  • web-server/src/auth/queries.ts
  • web-server/src/auth/session.ts
  • web-server/src/auth/types.ts
  • web-server/src/components/AccountMenu/index.tsx
  • web-server/src/components/BenchmarkSettingsForm.tsx
  • web-server/src/components/ClustoxJenkinsMapping.tsx
  • web-server/src/components/ClustoxJenkinsSetup.tsx
  • web-server/src/components/ClustoxUserFooter.tsx
  • web-server/src/components/ClustoxWorkspaceMetrics.tsx
  • web-server/src/components/ClustoxWorkspaceSwitcher.tsx
  • web-server/src/components/ConfigureJiraIncidentSourceModalBody.tsx
  • web-server/src/components/ContributorFilter.tsx
  • web-server/src/components/DoraMetricsConfigurationSettings.tsx
  • web-server/src/components/JiraConnectionsManager.tsx
  • web-server/src/components/PageHeader.tsx
  • web-server/src/components/RoleChip.tsx
  • web-server/src/components/TeamIncidentPRsFilter.tsx
  • web-server/src/components/TeamProductionBranchSelector.tsx
  • web-server/src/components/TeamSelector/useTeamSelectorSetup.tsx
  • web-server/src/components/Teams/CreateTeams.tsx
  • web-server/src/components/Teams/TeamJiraProjects.tsx
  • web-server/src/components/Teams/TeamRepoProjectMappings.tsx
  • web-server/src/components/Teams/__tests__/TeamJiraProjects.test.tsx
  • web-server/src/components/Teams/__tests__/TeamRepoProjectMappings.test.tsx
  • web-server/src/components/Teams/__tests__/useTeamRepoProjectMappings.test.ts
  • web-server/src/components/Teams/useTeamJiraProjectsConfig.tsx
  • web-server/src/components/Teams/useTeamRepoProjectMappings.tsx
  • web-server/src/components/Teams/useTeamsConfig.tsx
  • web-server/src/components/UserAvatar.tsx
  • web-server/src/components/__tests__/ConfigureJiraIncidentSourceModalBody.test.tsx
  • web-server/src/components/__tests__/JiraConnectionsManager.test.tsx
  • web-server/src/constants/__tests__/codeProviders.test.ts
  • web-server/src/constants/codeProviders.ts
  • web-server/src/constants/db.ts
  • web-server/src/constants/feature.ts
  • web-server/src/constants/integrations.ts
  • web-server/src/constants/routes.ts
  • web-server/src/constants/useRoute.ts
  • web-server/src/content/Dashboards/BitbucketIntegrationCard.tsx
  • web-server/src/content/Dashboards/ConfigureBitbucketModalBody.tsx
  • web-server/src/content/Dashboards/ConfigureGithubModalBody.tsx
  • web-server/src/content/Dashboards/ConfigureGitlabModalBody.tsx
  • web-server/src/content/Dashboards/ConfigureJiraModalBody.tsx
  • web-server/src/content/Dashboards/JiraIntegrationCard.tsx
  • web-server/src/content/Dashboards/__tests__/BitbucketIntegrationCard.test.tsx
  • web-server/src/content/Dashboards/__tests__/ConfigureBitbucketModalBody.test.tsx
  • web-server/src/content/Dashboards/__tests__/ConfigureJiraModalBody.test.tsx
  • web-server/src/content/Dashboards/__tests__/JiraIntegrationCard.test.tsx
  • web-server/src/content/Dashboards/githubIntegration.tsx
  • web-server/src/content/Dashboards/useIntegrationHandlers.tsx
  • web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/ChangeTimeCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/LeadTimeBreakdownCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/LinesOfCodeCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/MeanTimeToRestoreCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/SprintRollupCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/TicketCycleTimeCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx
  • web-server/src/content/DoraMetrics/DoraCards/__tests__/LeadTimeBreakdownCard.test.tsx
  • web-server/src/content/DoraMetrics/DoraCards/__tests__/LinesOfCodeCard.test.tsx
  • web-server/src/content/DoraMetrics/DoraCards/__tests__/SprintRollupCard.test.tsx
  • web-server/src/content/DoraMetrics/DoraCards/__tests__/TicketCycleTimeCard.test.tsx
  • web-server/src/content/DoraMetrics/DoraCards/__tests__/noBenchmarksRegression.test.tsx
  • web-server/src/content/DoraMetrics/DoraCards/sharedComponents.tsx
  • web-server/src/content/DoraMetrics/DoraCards/sharedHooks.tsx
  • web-server/src/content/DoraMetrics/DoraMetricsBody.tsx
  • web-server/src/content/PullRequests/LeadTimeStatsCore.tsx
  • web-server/src/content/PullRequests/TeamInsightsBody.tsx
  • web-server/src/content/PullRequests/__tests__/LeadTimeStatsCore.test.tsx
  • web-server/src/content/PullRequests/__tests__/useChangeTimePipeline.test.ts
  • web-server/src/content/PullRequests/__tests__/useTicketLeadTimeSegment.test.ts
  • web-server/src/content/PullRequests/useChangeTimePipeline.ts
  • web-server/src/content/PullRequests/useTicketLeadTimeSegment.ts
  • web-server/src/contexts/ThirdPartyAuthContext.tsx
  • web-server/src/hooks/useAutofillSync.ts
  • web-server/src/hooks/useClustoxUser.ts
  • web-server/src/hooks/useDoraMetricsFetchArgs.ts
  • web-server/src/hooks/useJiraConnections.ts
  • web-server/src/hooks/usePageRefreshCallback.ts
  • web-server/src/layouts/ExtendedSidebarLayout/Sidebar/SidebarMenu/items.tsx
  • web-server/src/layouts/ExtendedSidebarLayout/Sidebar/SidebarMenu/useFilteredSidebarItems.tsx
  • web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx
  • web-server/src/mocks/__mocks__/svg.js
  • web-server/src/slices/dora_metrics.ts
  • web-server/src/theme/schemes/theme.ts
  • web-server/src/types/next-auth.d.ts
  • web-server/src/types/request.ts
  • web-server/src/types/resources.ts
  • web-server/src/utils/__tests__/auth-jira.test.ts
  • web-server/src/utils/__tests__/benchmarkBand.test.ts
  • web-server/src/utils/__tests__/benchmarks.test.ts
  • web-server/src/utils/__tests__/bitbucketRepos.test.ts
  • web-server/src/utils/__tests__/contributorFilters.test.ts
  • web-server/src/utils/__tests__/contributorQuery.test.ts
  • web-server/src/utils/__tests__/fetchLocStats.test.ts
  • web-server/src/utils/__tests__/filterUtils.test.ts
  • web-server/src/utils/__tests__/locCard.test.ts
  • web-server/src/utils/api-error.ts
  • web-server/src/utils/auth.ts
  • web-server/src/utils/benchmarkBand.ts
  • web-server/src/utils/benchmarks.ts
  • web-server/src/utils/bitbucketRepos.ts
  • web-server/src/utils/cockpitMetricUtils.ts
  • web-server/src/utils/contributorFilters.ts
  • web-server/src/utils/contributorQuery.ts
  • web-server/src/utils/filterUtils.ts
  • web-server/src/utils/locCard.ts
  • web-server/src/utils/mailer.ts
  • web-server/src/utils/testUtils.tsx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

4 participants