Skip to content

Commit 65c9522

Browse files
authored
fix(playwrighttesting): branch name for ADO pipelines (Azure#32621)
### Packages impacted by this PR @azure/microsoft-playwright-testing ### Issues associated with this PR ### Describe the problem that is addressed by this PR ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
1 parent 7c1f45c commit 65c9522

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sdk/playwrighttesting/microsoft-playwright-testing/src/utils/cIInfoProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class CIInfoProvider {
5959
return {
6060
provider: CI_PROVIDERS.ADO,
6161
repo: process.env["BUILD_REPOSITORY_ID"] || null,
62-
branch: process.env["BUILD_SOURCEBRANCH"] || null,
62+
branch: process.env["BUILD_SOURCEBRANCHNAME"] || null,
6363
author: process.env["BUILD_REQUESTEDFOR"] || null,
6464
commitId: process.env["BUILD_SOURCEVERSION"] || null,
6565
revisionUrl: process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"]

sdk/playwrighttesting/microsoft-playwright-testing/test/utils/clInfoProvider.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ describe("CIInfoProvider", () => {
6161
process.env["AZURE_HTTP_USER_AGENT"] = "someAgent";
6262
process.env["TF_BUILD"] = "true";
6363
process.env["BUILD_REPOSITORY_ID"] = "repo123";
64-
process.env["BUILD_SOURCEBRANCH"] = "main";
64+
process.env["BUILD_SOURCEBRANCH"] = "refs/head/main";
65+
process.env["BUILD_SOURCEBRANCHNAME"] = "main";
6566
process.env["BUILD_REQUESTEDFOR"] = "testAuthor";
6667
process.env["BUILD_SOURCEVERSION"] = "commitSha123";
6768
process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"] = "https://dev.azure.com/";

0 commit comments

Comments
 (0)