Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PR created from a fork #3509

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
*--------------------------------------------------------------------------------------------*/
'use strict';




import * as pathLib from 'path';
import * as vscode from 'vscode';


import { GitErrorCodes } from './api/api1';
import { CommentReply, resolveCommentHandler } from './commentHandlerResolver';
import { IComment } from './common/comment';
Expand All @@ -29,6 +34,7 @@ import { ReviewManager } from './view/reviewManager';
import { CategoryTreeNode } from './view/treeNodes/categoryNode';
import { CommitNode } from './view/treeNodes/commitNode';
import { DescriptionNode } from './view/treeNodes/descriptionNode';

import {
FileChangeNode,
GitFileChangeNode,
Expand Down
6 changes: 6 additions & 0 deletions src/commentHandlerResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
*--------------------------------------------------------------------------------------------*/
'use strict';




import * as vscode from 'vscode';


import Logger from './common/logger';
import { GHPRComment, GHPRCommentThread, TemporaryComment } from './github/prComment';

Expand All @@ -23,6 +28,7 @@ export interface CommentHandler {
unresolveReviewThread(thread: GHPRCommentThread, input?: string): Promise<void>;
}


export interface CommentReply {
thread: GHPRCommentThread;
text: string;
Expand Down
7 changes: 7 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/




export const EXTENSION_ID = 'GitHub.vscode-pull-request-github';
export const VSLS_REQUEST_NAME = 'git';


export const VSLS_GIT_PR_SESSION_NAME = 'ghpr';

export const VSLS_REPOSITORY_INITIALIZATION_NAME = 'initialize';

export const VSLS_STATE_CHANGE_NOTIFY_NAME = 'statechange';
export const FOCUS_REVIEW_MODE = 'github:focusedReview';
7 changes: 7 additions & 0 deletions src/experimentationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,28 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/



import * as vscode from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry';
import {
getExperimentationService,
IExperimentationService,
IExperimentationTelemetry,
TargetPopulation,

} from 'vscode-tas-client';



/* __GDPR__

"query-expfeature" : {
"ABExp.queriedFeature": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/


export class ExperimentationTelemetry implements IExperimentationTelemetry {
private sharedProperties: Record<string, string> = {};

Expand Down
4 changes: 4 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/



'use strict';
import * as vscode from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry';
import { LiveShare } from 'vsls/vscode.js';
import { Repository } from './api/api';
import { GitApiImpl } from './api/api1';

import { registerCommands } from './commands';
import { commands } from './common/executeCommands';
import Logger from './common/logger';
import * as PersistentState from './common/persistentState';

import { Resource } from './common/resources';
import { SessionState } from './common/sessionState';
import { BRANCH_PUBLISH, FILE_LIST_LAYOUT, PR_SETTINGS_NAMESPACE } from './common/settingKeys';
Expand Down
10 changes: 8 additions & 2 deletions src/extensionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { IAccount } from './github/interface';
import
{ IAccount } from './github/interface';



// Synced keys
export const NEVER_SHOW_PULL_NOTIFICATION = 'github.pullRequest.pullNotification.show';
Expand All @@ -13,7 +16,9 @@ export const REPO_KEYS = 'github.pullRequest.repos';

export interface RepoState {
mentionableUsers?: IAccount[];

stateModifiedTime?: number;

}

export interface ReposState {
Expand All @@ -22,4 +27,5 @@ export interface ReposState {

export function setSyncedKeys(context: vscode.ExtensionContext) {
context.globalState.setKeysForSync([NEVER_SHOW_PULL_NOTIFICATION]);
}
}

2 changes: 2 additions & 0 deletions src/gitExtensionIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Repository {
readonly description: string | null;
readonly clone_url: string;
readonly ssh_url: string;

}

function repoResponseAsRemoteSource(raw: OctokitCommon.SearchReposResponseItem): RemoteSource {
Expand All @@ -20,6 +21,7 @@ function repoResponseAsRemoteSource(raw: OctokitCommon.SearchReposResponseItem):
description: raw.description || undefined,
url: raw.url,
};

}

function asRemoteSource(raw: Repository): RemoteSource {
Expand Down
7 changes: 7 additions & 0 deletions src/gitProviders/builtinGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ export class BuiltinGitProvider implements IGit, vscode.Disposable {
return this._gitAPI.repositories as any[];
}




get state(): APIState {
return this._gitAPI.state;


}



private _onDidOpenRepository = new vscode.EventEmitter<Repository>();
readonly onDidOpenRepository: vscode.Event<Repository> = this._onDidOpenRepository.event;
private _onDidCloseRepository = new vscode.EventEmitter<Repository>();
Expand Down
6 changes: 6 additions & 0 deletions src/gitProviders/vslshost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ import {
VSLS_REPOSITORY_INITIALIZATION_NAME,
VSLS_REQUEST_NAME,
VSLS_STATE_CHANGE_NOTIFY_NAME,


} from '../constants';




export class VSLSHost implements vscode.Disposable {
private _sharedService?: SharedService;
private _disposables: vscode.Disposable[];
constructor(private _liveShareAPI: LiveShare, private _api: API) {
this._disposables = [];
}


public async initialize() {
this._sharedService = (await this._liveShareAPI!.shareService(VSLS_GIT_PR_SESSION_NAME)) || undefined;

Expand Down