Skip to content

Commit

Permalink
Merge branch 'microsoft:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mdresch authored Dec 4, 2024
2 parents 404ba8a + e2ecae2 commit 3ce16e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coe-cli/src/commands/devops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,7 @@ class DevOpsCommand {
}

async getGitCommitChanges(args: DevOpsBranchArguments, gitApi: gitm.IGitApi, projectRepo: GitRepository, pipelineRepo: GitRepository, sourceBranch: string, destinationBranch: string, defaultBranch: string, names: string[]): Promise<GitChange[]> {
const personalAccessTokenRegexp = /^.{76}AZDO.{4}$/;
let pipelineProject = args.pipelineProject?.length > 0 ? args.pipelineProject : args.projectName
let results: GitChange[] = []

Expand All @@ -1215,7 +1216,7 @@ class DevOpsCommand {
'Authorization': `Bearer ${accessToken}`
}
}
if (accessToken.length === 52) {
if (accessToken.length === 52 || personalAccessTokenRegexp.test(accessToken)) {
config = {
headers: {
'Authorization': `Basic ${Buffer.from(":" + accessToken).toString('base64')}`
Expand Down

0 comments on commit 3ce16e3

Please sign in to comment.