Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #328 from milanmelisik/e4e-release-changes
Browse files Browse the repository at this point in the history
E4e release changes 1.5.2
  • Loading branch information
uzuko001 authored May 31, 2023
2 parents 959ac85 + 0223eeb commit a9a03f1
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

You can find all notable changes to Explorer for Endevor in this document.

## [1.5.2] – 2023-05-26

- Fixed an issue with Generate with Copyback action which performed a Generate in place instead in case Override Signout was needed.
- Fixed the workspace pull command by incorporating the provided ccid and comment to the request.

## [1.5.1] – 2023-05-10

- Fixed an issue with Add an Element command which prevented local elements being added to Endevor.
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-for-endevor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Explorer for Endevor",
"description": "Extension that modernizes the way you interact with Endevor inventory locations and elements",
"author": "Broadcom",
"version": "1.5.1",
"version": "1.5.2",
"publisher": "BroadcomMFD",
"homepage": "https://github.com/eclipse/che-che4z-explorer-for-endevor",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,28 @@ describe('generating an element with copy back', () => {
);
}
// assert
const [, , , , , generalFunctionStub] = generateElementStub;
const generalFunctionStub = generateElementStub.pop();
assert.ok(
generalFunctionStub.calledTwice,
generalFunctionStub?.calledTwice,
`Generate element with copy back Endevor API was not called twice`
);
assert.ok(
dispatchGenerateAction.called,
'Dispatch for the generated element was not called'
);
assert.deepStrictEqual(
generalFunctionStub?.secondCall.args,
[{ overrideSignOut: true }],
'Second generate was not called with override signout set'
);
generateElementStub.shift(); // do not test first argument which is progressReporter
generateElementStub.forEach((stub) =>
assert.deepStrictEqual(
stub.secondCall.args,
stub.firstCall.args,
'Arguments in the first generate call and second generate call with override signout were not equal'
)
);
const actualDispatchAction = dispatchGenerateAction.args[0]?.[0];
const expectedDispatchAction: ElementGeneratedWithCopyBack = {
type: Actions.ELEMENT_GENERATED_WITH_COPY_BACK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ const complexGenerateWithCopyBack =
)((progressReporter) =>
generateElementWithCopyBack(progressReporter)(service)(
configuration
)(element)(actionChangeControlValue)(copyBackParams)({
)(generateLocationValue)(actionChangeControlValue)(copyBackParams)({
overrideSignOut: true,
})
);
Expand Down
20 changes: 17 additions & 3 deletions packages/explorer-for-endevor/src/commands/sync/pullFromEndevor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ import {
import { showConflictResolutionRequiredMessage } from '../../dialogs/scm/conflictResolutionDialogs';
import { SearchLocation } from '../../_doc/Endevor';
import { Id } from '../../store/storage/_doc/Storage';
import {
askForChangeControlValue,
dialogCancelled as changeControlDialogCancelled,
} from '../../dialogs/change-control/endevorChangeControlDialogs';

export const pullFromEndevorCommand = async (
configurations: {
Expand Down Expand Up @@ -179,8 +183,18 @@ export const pullFromEndevorCommand = async (
logger.error(`${error.message}.`);
return;
}

// TODO: Remove these hardcoded values when ccid and comment are no longer required in this call.
const pullChangeControlValue = await askForChangeControlValue({
ccid: searchLocation.ccid,
comment: searchLocation.comment,
});
if (changeControlDialogCancelled(pullChangeControlValue)) {
logger.error('CCID and Comment must be specified to pull from Endevor.');
reporter.sendTelemetryEvent({
type: TelemetryEvents.COMMAND_PULL_FROM_ENDEVOR_COMPLETED,
status: PullFromEndevorCommandCompletedStatus.CANCELLED,
});
return;
}
const syncResult = await withNotificationProgress('Pulling from Endevor')(
(progressReporter) =>
syncEndevorWorkspaceOneWay(progressReporter)({
Expand All @@ -190,7 +204,7 @@ export const pullFromEndevorCommand = async (
...searchLocation,
subSystem: searchLocation.subsystem,
id: searchLocation.element,
})(folderUri)
})(pullChangeControlValue)(folderUri)
);
if (isError(syncResult)) {
const error = syncResult;
Expand Down
3 changes: 3 additions & 0 deletions packages/explorer-for-endevor/src/store/scm/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const syncWorkspaceOneWay =
type,
id: element,
}: Partial<ElementMapPath>) =>
({ ccid, comment }: ActionChangeControlValue) =>
async (folderUri: Uri): Promise<WorkspaceSyncResponse | Error> => {
const session = toSecuredEndevorSession(logger)(service);
const location: IElementBasicData = {
Expand All @@ -219,6 +220,8 @@ export const syncWorkspaceOneWay =
'workspace-dir': workspaceDir,
limit: defaultLimit,
'one-way': true,
ccid,
comment,
};
const progressApi: IHandlerProgressApi = {
startBar: (params) => {
Expand Down

0 comments on commit a9a03f1

Please sign in to comment.