From f3081a6560e588d5f869ab7dd4be1e3dc005de65 Mon Sep 17 00:00:00 2001 From: Idan Varsano Date: Tue, 15 Mar 2022 10:01:39 -0400 Subject: [PATCH] Unremoving phabricator integration fields, adding lines to changelog (#32573) * Unremoving phabricator fields, adding lines to changelog --- CHANGELOG.md | 2 +- schema/gitolite.schema.json | 43 +++++++++++++++++++++++++++++++++++-- schema/schema.go | 12 +++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ceb6483952..7a9a52fd027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to Sourcegraph are documented in this file. - Timestamps in the webapp will now display local time on hover instead of UTC time [#31672](https://github.com/sourcegraph/sourcegraph/pull/31672) - Updated Postgres version from 12.6 to 12.7 [#31933](https://github.com/sourcegraph/sourcegraph/pull/31933) - Code Insights will now periodically clean up data series that are not in use. There is a 1 hour grace period where the series can be reattached to a view, after which all of the time series data and metadata will be deleted. [#32094](https://github.com/sourcegraph/sourcegraph/pull/32094) +- The Phabricator integration with Gitolite code hosts has been deprecated, the fields have been kept to not break existing systems, but the integration does not work anymore ### Fixed @@ -40,7 +41,6 @@ All notable changes to Sourcegraph are documented in this file. ### Removed -- - The deprecated GraphQL field `SearchResults.resultCount` has been removed in favor of its replacement, `matchCount`. [#31573](https://github.com/sourcegraph/sourcegraph/pull/31573) - The deprecated site-config field `UseJaeger` has been removed. Use `"observability.tracing": { "sampling": "all" }` instead [#31294](https://github.com/sourcegraph/sourcegraph/pull/31294/commits/6793220d6cf1200535a2610d79d2dd9e18c67dca) diff --git a/schema/gitolite.schema.json b/schema/gitolite.schema.json index 880bb483351..73ad2b806ae 100644 --- a/schema/gitolite.schema.json +++ b/schema/gitolite.schema.json @@ -34,7 +34,14 @@ "type": "object", "title": "ExcludedGitoliteRepo", "additionalProperties": false, - "anyOf": [{ "required": ["name"] }, { "required": ["pattern"] }], + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["pattern"] + } + ], "properties": { "name": { "description": "The name of a Gitolite repo (\"my-repo\") to exclude from mirroring.", @@ -48,7 +55,39 @@ } } }, - "examples": [[{ "name": "myrepo" }, { "pattern": ".*secret.*" }]] + "examples": [ + [ + { + "name": "myrepo" + }, + { + "pattern": ".*secret.*" + } + ] + ] + }, + "phabricatorMetadataCommand": { + "description": "This is DEPRECATED", + "deprecationMessage": "DEPRECATED: the Phabricator integration with Gitolite code hosts is deprecated", + "type": "string" + }, + "phabricator": { + "description": "This is DEPRECATED", + "deprecationMessage": "DEPRECATED: the Phabricator integration with Gitolite code hosts is deprecated", + "type": "object", + "required": ["url", "callsignCommand"], + "additionalProperties": false, + "properties": { + "url": { + "description": "URL of the Phabricator instance that integrates with this Gitolite instance. This should be set ", + "type": "string", + "format": "uri" + }, + "callsignCommand": { + "description": " Bash command that prints out the Phabricator callsign for a Gitolite repository. This will be run with environment variable $REPO set to the name of the repository and used to obtain the Phabricator metadata for a Gitolite repository. (Note: this requires `bash` to be installed.)", + "type": "string" + } + } } } } diff --git a/schema/schema.go b/schema/schema.go index e2bdf5e9765..fb91fcba230 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -890,6 +890,10 @@ type GitoliteConnection struct { Exclude []*ExcludedGitoliteRepo `json:"exclude,omitempty"` // Host description: Gitolite host that stores the repositories (e.g., git@gitolite.example.com, ssh://git@gitolite.example.com:2222/). Host string `json:"host"` + // Phabricator description: This is DEPRECATED + Phabricator *Phabricator `json:"phabricator,omitempty"` + // PhabricatorMetadataCommand description: This is DEPRECATED + PhabricatorMetadataCommand string `json:"phabricatorMetadataCommand,omitempty"` // Prefix description: Repository name prefix that will map to this Gitolite host. This should likely end with a trailing slash. E.g., "gitolite.example.com/". // // It is important that the Sourcegraph repository name generated with this prefix be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. @@ -1340,6 +1344,14 @@ type PermissionsUserMapping struct { Enabled bool `json:"enabled,omitempty"` } +// Phabricator description: This is DEPRECATED +type Phabricator struct { + // CallsignCommand description: Bash command that prints out the Phabricator callsign for a Gitolite repository. This will be run with environment variable $REPO set to the name of the repository and used to obtain the Phabricator metadata for a Gitolite repository. (Note: this requires `bash` to be installed.) + CallsignCommand string `json:"callsignCommand"` + // Url description: URL of the Phabricator instance that integrates with this Gitolite instance. This should be set + Url string `json:"url"` +} + // PhabricatorConnection description: Configuration for a connection to Phabricator. type PhabricatorConnection struct { // Repos description: The list of repositories available on Phabricator.