@@ -20,79 +20,79 @@ describe("getRepositoryId", () => {
2020 describe ( "CI environment variables" , ( ) => {
2121 it ( "should detect GitHub repository from GITHUB_REPOSITORY" , ( ) => {
2222 process . env . GITHUB_REPOSITORY = "owner/repo" ;
23- expect ( getRepositoryId ( ) ) . toBe ( "github:owner/repo " ) ;
23+ expect ( getRepositoryId ( ) ) . toBe ( "github:owner/071ca222 " ) ;
2424 } ) ;
2525
2626 it ( "should detect GitLab repository from CI_PROJECT_PATH" , ( ) => {
2727 process . env . CI_PROJECT_PATH = "namespace/project" ;
28- expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/project " ) ;
28+ expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/244210e4 " ) ;
2929 } ) ;
3030
3131 it ( "should detect Bitbucket repository from BITBUCKET_REPO_FULL_NAME" , ( ) => {
3232 process . env . BITBUCKET_REPO_FULL_NAME = "workspace/repo" ;
33- expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/repo " ) ;
33+ expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/071ca222 " ) ;
3434 } ) ;
3535
3636 it ( "should prioritize CI environment variables over git remote" , ( ) => {
3737 process . env . GITHUB_REPOSITORY = "owner/repo" ;
3838 vi . mocked ( execSync ) . mockReturnValue (
3939 "git@gitlab.com:other/project.git" as any ,
4040 ) ;
41- expect ( getRepositoryId ( ) ) . toBe ( "github:owner/repo " ) ;
41+ expect ( getRepositoryId ( ) ) . toBe ( "github:owner/071ca222 " ) ;
4242 } ) ;
4343 } ) ;
4444
4545 describe ( "git remote URL parsing" , ( ) => {
4646 it ( "should parse GitHub SSH URL" , ( ) => {
4747 vi . mocked ( execSync ) . mockReturnValue ( "git@github.com:owner/repo.git" as any ) ;
48- expect ( getRepositoryId ( ) ) . toBe ( "github:owner/repo " ) ;
48+ expect ( getRepositoryId ( ) ) . toBe ( "github:owner/071ca222 " ) ;
4949 } ) ;
5050
5151 it ( "should parse GitHub HTTPS URL" , ( ) => {
5252 vi . mocked ( execSync ) . mockReturnValue (
5353 "https://github.com/owner/repo.git" as any ,
5454 ) ;
55- expect ( getRepositoryId ( ) ) . toBe ( "github:owner/repo " ) ;
55+ expect ( getRepositoryId ( ) ) . toBe ( "github:owner/071ca222 " ) ;
5656 } ) ;
5757
5858 it ( "should parse GitLab SSH URL" , ( ) => {
5959 vi . mocked ( execSync ) . mockReturnValue (
6060 "git@gitlab.com:namespace/project.git" as any ,
6161 ) ;
62- expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/project " ) ;
62+ expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/244210e4 " ) ;
6363 } ) ;
6464
6565 it ( "should parse GitLab HTTPS URL" , ( ) => {
6666 vi . mocked ( execSync ) . mockReturnValue (
6767 "https://gitlab.com/namespace/project.git" as any ,
6868 ) ;
69- expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/project " ) ;
69+ expect ( getRepositoryId ( ) ) . toBe ( "gitlab:namespace/244210e4 " ) ;
7070 } ) ;
7171
7272 it ( "should parse Bitbucket SSH URL" , ( ) => {
7373 vi . mocked ( execSync ) . mockReturnValue (
7474 "git@bitbucket.org:workspace/repo.git" as any ,
7575 ) ;
76- expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/repo " ) ;
76+ expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/071ca222 " ) ;
7777 } ) ;
7878
7979 it ( "should parse Bitbucket HTTPS URL" , ( ) => {
8080 vi . mocked ( execSync ) . mockReturnValue (
8181 "https://bitbucket.org/workspace/repo.git" as any ,
8282 ) ;
83- expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/repo " ) ;
83+ expect ( getRepositoryId ( ) ) . toBe ( "bitbucket:workspace/071ca222 " ) ;
8484 } ) ;
8585
8686 it ( "should parse self-hosted git URL with generic prefix" , ( ) => {
8787 vi . mocked ( execSync ) . mockReturnValue (
8888 "git@custom-git.company.com:team/project.git" as any ,
8989 ) ;
90- expect ( getRepositoryId ( ) ) . toBe ( "git:team/project " ) ;
90+ expect ( getRepositoryId ( ) ) . toBe ( "git:team/244210e4 " ) ;
9191 } ) ;
9292
9393 it ( "should handle URLs without .git extension" , ( ) => {
9494 vi . mocked ( execSync ) . mockReturnValue ( "git@github.com:owner/repo" as any ) ;
95- expect ( getRepositoryId ( ) ) . toBe ( "github:owner/repo " ) ;
95+ expect ( getRepositoryId ( ) ) . toBe ( "github:owner/071ca222 " ) ;
9696 } ) ;
9797
9898 it ( "should return null when git command fails" , ( ) => {
0 commit comments