58
}
59
}
61
>
if (!gitHubState) {
62
>
gitHubState = readSessionGitHubState(this._stateManager.getSessionState(sessionKey)?._meta);
63
>
}
64
>
65
>
const parsed = parseChangesetUri(changeset);
66
>
if (!parsed) {
67
return [];
68
}
70
>
return this._getOperations({
71
>
sessionKey,
72
>
changesetUri: changeset,
73
>
changesetKind: parsed.kind,
74
>
gitState,
75
>
gitHubState
76
>
});
77
}
78
79
private _getOperations(context: IChangesetOperationContext): readonly ChangesetOperation[] {
81
>
for (const contribution of this._handlerRegistrations.keys()) {
82
>
const contributed = contribution.getOperations(context);
83
>
if (contributed) {
84
>
operations.push(...contributed);
85
>
}
86
>
}
87
>
88
>
// Operations are disabled while a turn is active so the working tree /
89
>
// branch state can't be mutated mid-request.
90
>
if (this._stateManager.hasActiveTurn(context.sessionKey)) {
91
return operations.map(operation => ({
92
...operation,