Skip to content

Commit 9ab795c

Browse files
Merge branch 'main' into axon-1530-thinking-block-reopen
2 parents b92b3d0 + 626464c commit 9ab795c

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
# the repo. Unless a later match takes precedence,
66
# @global-owner1 and @global-owner2 will be requested for
77
# review when someone opens a pull request.
8-
# AXON TEAM: @bwieger-atlassian-com @sdzh-atlassian @cabella-dot @marcomura
8+
# AXON TEAM: @bwieger-atlassian-com @sdzh-atlassian @cabella-dot @marcomura @jwang19-atlassian @teg-atlassian
99
# SOFTSERVE TEAM: @bhorai-atl @om-ukr @sspanchenko
1010
# BBY FOLKS: @Blastoplex @mattcolman @matt-lassian @dchiew-atl @amarg-at @ccallcottstevens
1111

12-
* @bwieger-atlassian-com @sdzh-atlassian @cabella-dot @marcomura @bhorai-atl @om-ukr @sspanchenko @Blastoplex @mattcolman @matt-lassian @dchiew-atl @amarg-at @ccallcottstevens
12+
* @bwieger-atlassian-com @sdzh-atlassian @cabella-dot @marcomura @jwang19-atlassian @teg-atlassian @bhorai-atl @om-ukr @sspanchenko @Blastoplex @mattcolman @matt-lassian @dchiew-atl @amarg-at @ccallcottstevens
1313

1414
# Order is important; the last matching pattern takes the most
1515
# precedence. When someone opens a pull request that only

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
],
4747
"main": "./build/extension/extension",
4848
"rovoDev": {
49-
"version": "0.13.6"
49+
"version": "0.13.11"
5050
},
5151
"scripts": {
5252
"vscode:uninstall": "node ./build/extension/uninstall.js",

src/util/rovo-dev-entitlement/rovoDevEntitlementChecker.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ describe('RovoDevEntitlementChecker', () => {
2020
let mockClientManager: any;
2121
let mockConfig: any;
2222
let mockFeatureGateClient: any;
23-
23+
let mockSiteManager: any;
2424
beforeEach(() => {
25+
mockSiteManager = {
26+
onDidSitesAvailableChange: jest.fn().mockReturnValue({ dispose: jest.fn() }),
27+
};
28+
(Container as any).siteManager = mockSiteManager;
2529
mockAnalyticsClient = {
2630
sendTrackEvent: jest.fn(),
2731
} as any;
@@ -43,6 +47,7 @@ describe('RovoDevEntitlementChecker', () => {
4347
(Container as any).clientManager = mockClientManager;
4448
(Container as any).config = mockConfig;
4549
(Container as any).featureFlagClient = mockFeatureGateClient;
50+
(Container as any).siteManager = mockSiteManager;
4651
(Logger.debug as jest.Mock).mockImplementation(() => {});
4752
(Logger.error as jest.Mock).mockImplementation(() => {});
4853
(rovoDevEntitlementCheckEvent as jest.Mock).mockResolvedValue({});

src/util/rovo-dev-entitlement/rovoDevEntitlementChecker.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@ export class RovoDevEntitlementChecker extends Disposable {
3434

3535
private _enabled: boolean;
3636

37+
private _cachedEntitlement: EntitlementResponse | null;
38+
3739
private disposable: Disposable;
3840

3941
constructor(analyticsClient: AnalyticsClient) {
4042
super(() => this._dispose());
4143
this._analyticsClient = analyticsClient;
4244
this._enabled = Container.config.rovodev.showEntitlementNotifications;
43-
44-
this.disposable = Disposable.from(configuration.onDidChange(this.onDidChangeConfiguration, this));
45+
this._cachedEntitlement = null;
46+
this.disposable = Disposable.from(
47+
configuration.onDidChange(this.onDidChangeConfiguration, this),
48+
Container.siteManager.onDidSitesAvailableChange(() => {
49+
this._cachedEntitlement = null;
50+
}, this),
51+
);
4552
}
4653

4754
private onDidChangeConfiguration(e: ConfigurationChangeEvent) {
@@ -52,6 +59,10 @@ export class RovoDevEntitlementChecker extends Disposable {
5259

5360
public async checkEntitlement(): Promise<EntitlementResponse> {
5461
try {
62+
if (this._cachedEntitlement) {
63+
Logger.debug(`Cached entitlement response: ${this._cachedEntitlement.type}`);
64+
return this._cachedEntitlement;
65+
}
5566
const credentials = await Container.clientManager.getCloudPrimarySite();
5667

5768
if (!credentials) {
@@ -96,10 +107,11 @@ export class RovoDevEntitlementChecker extends Disposable {
96107
this._analyticsClient.sendTrackEvent(e);
97108
});
98109

99-
return {
110+
this._cachedEntitlement = {
100111
isEntitled: true,
101112
type: value.trim() as RovoDevEntitlementType,
102113
};
114+
return this._cachedEntitlement;
103115
} catch (err) {
104116
Logger.error(err, 'Unable to check Rovo Dev entitlement');
105117
const errType: string =

src/webviews/components/issue/view-issue-screen/JiraIssuePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export default class JiraIssuePage extends AbstractIssueEditorPage<Emit, Accept,
376376
loadingField: field.key,
377377
fieldValues: { ...this.state.fieldValues, ...{ [field.key]: typedVal } },
378378
});
379-
if (typedVal === undefined) {
379+
if (typedVal === undefined || typedVal === '') {
380380
typedVal = null;
381381
}
382382
await this.handleEditIssue(field.key, typedVal, teamId);

0 commit comments

Comments
 (0)