From 112b915e7e51b0b52d8a75a65cfd728fc8db9bc2 Mon Sep 17 00:00:00 2001 From: Evan Krause Date: Wed, 16 Oct 2024 16:28:23 -0700 Subject: [PATCH] Fetch repo callsign Summary: Phabricator repos want to have an ID they can use to refer to repos. We can get this from the `phrevset.callsign`. Differential Revision: D64490625 fbshipit-source-id: 33ddb8b73efbb4e4a91dd27677af758057e40ec8 --- addons/isl-server/src/Repository.ts | 3 ++- addons/isl/src/types.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/isl-server/src/Repository.ts b/addons/isl-server/src/Repository.ts index 63a239612ad3f..19d792380615e 100644 --- a/addons/isl-server/src/Repository.ts +++ b/addons/isl-server/src/Repository.ts @@ -476,6 +476,7 @@ export class Repository { 'paths.default', 'github.pull_request_domain', 'github.preferred_submit_command', + 'phrevset.callsign', ]), ]); const pathsDefault = configs.get('paths.default') ?? ''; @@ -507,7 +508,7 @@ export class Repository { if (Internal.isMononokePath?.(pathsDefault)) { // TODO: where should we be getting this from? arcconfig instead? do we need this? const repo = pathsDefault.slice(pathsDefault.lastIndexOf('/') + 1); - codeReviewSystem = {type: 'phabricator', repo}; + codeReviewSystem = {type: 'phabricator', repo, callsign: configs.get('phrevset.callsign')}; } else if (pathsDefault === '') { codeReviewSystem = {type: 'none'}; } else { diff --git a/addons/isl/src/types.ts b/addons/isl/src/types.ts index 0a0b9a0baf8bd..efc77beb8cb78 100644 --- a/addons/isl/src/types.ts +++ b/addons/isl/src/types.ts @@ -200,6 +200,7 @@ export type CodeReviewSystem = | { type: 'phabricator'; repo: string; + callsign?: string; } | { type: 'none';