Skip to content

WIP Apply auth patch #454

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

Open
wants to merge 2 commits into
base: apply-overview-patch
Choose a base branch
from
Open

WIP Apply auth patch #454

wants to merge 2 commits into from

Conversation

sn2912
Copy link
Contributor

@sn2912 sn2912 commented Jun 9, 2025

What Is This Change?

Applied patches for auth changes from fork for PRs 1,16,27,28,34,39,48,49, 52

How Has This Been Tested?

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

  • If Atlassian employee & Bitbucket changes: did you test with DC in mind? See Instructions

Recommendations:

  • Update the CHANGELOG if making a user facing change

@sn2912 sn2912 changed the base branch from main to apply-overview-patch June 9, 2025 08:17
@sn2912 sn2912 force-pushed the apply-overview-patch branch from e7f52e1 to b28701a Compare June 9, 2025 08:20
@sn2912 sn2912 force-pushed the apply-auth-patch branch from 0c2af77 to a347bff Compare June 9, 2025 08:25
@@ -292,4 +305,285 @@ describe('LoginManager', () => {
);
});
});

describe('extractTokenFromGitRemoteRegex', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later

});
});

describe('getAuthTokenFromHomeGitCredentials', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later

});
});

describe('authenticateWithBitbucketToken', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later

@@ -853,7 +857,7 @@
"properties": {
"atlascode.outputLevel": {
"type": "string",
"default": "silent",
"default": "debug",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove for upstream. This is only for devboxes.

@@ -223,21 +223,6 @@ describe('CredentialManager', () => {
site: mockJiraSite,
});
});

it("should not save to secret storage if auth info hasn't changed", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this test?

/**
* Saves the auth info to both the in-memory store and the secretstorage for Bitbucket API key login
*/
public async saveAuthInfoBBToken(site: DetailedSiteInfo, info: AuthInfo, id: number): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is not used anywhere in the fork. Can be safely removed.

@@ -0,0 +1,188 @@
import * as vscode from 'vscode';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test file not belong to a previous PR?

@@ -228,7 +228,7 @@ export class Container {
)),
);
this._context.subscriptions.push((this._jiraActiveIssueStatusBar = new JiraActiveIssueStatusBar(bbCtx)));

Container.authenticateWithBitbucketToken();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduce a new config: isdevsphere=true and only then call this function. In upstream, we don't want to trigger this flow by default.

And add a comment that this whole flow is catered towards devsphere and not general public.

return true;
} catch (e) {
Logger.error(e, 'Error authenticating with Bitbucket token');
vscode.window.showErrorMessage(`Error authenticating with Bitbucket token: ${e}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this log: it is removed in a later patch 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants