Skip to content
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

Add support for empty repos in GL #184

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Add support for empty repos in GL #184

merged 2 commits into from
Jan 27, 2025

Conversation

filiptronicek
Copy link
Member

Description

Makes the button injection work for empty repositories in GitLab, so that you can kickstart a project right from that page.

image

Related Issue(s)

Fixes CLC-1073

How to test

Visit https://gitlab.com/filiptronicek/empty

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Can't test, but the unit tests seems ✔️

(except some that point to https://gitlab.com/svenefftinge/browser-extension-test which is no longer empty...)

@filiptronicek
Copy link
Member Author

Local tests seem to be a-ok

filip@Filips-MacBook-Pro:~/Documents/GitHub/browser-extension/ > pnpm test

> [email protected] test /Users/filip/Documents/GitHub/browser-extension
> cd test && pnpm test


> [email protected] test /Users/filip/Documents/GitHub/browser-extension/test
> cp ../src/button/button-contributions.ts ./src/button-contributions-copy.ts && tsc && mocha dist/**/*.spec.js



  Platform match tests
    ✔ should detect the platform for https://gitlab.com/svenefftinge/browser-extension-test (1142ms)
    ✔ should detect the platform for https://gitlab.com/svenefftinge/browser-extension-test/-/tree/my-branch (710ms)
    ✔ should detect the platform for https://gitlab.com/filiptronicek/empty (632ms)
    ✔ should detect the platform for https://gitlab.com/svenefftinge/browser-extension-test/-/merge_requests/1 (1121ms)
    ✔ should detect the platform for https://gitlab.com/svenefftinge/browser-extension-test/-/issues/1 (1124ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test (808ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test/tree/my-branch (591ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test/commit/82d701a9ac26ea25da9b24c5b3722b7a89e43b16 (802ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test/issues/1 (613ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test/pull/2 (464ms)
    ✔ should detect the platform for https://github.com/svenefftinge/browser-extension-test/blob/my-branch/README.md (508ms)
    ✔ should detect the platform for https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse (333ms)
    ✔ should detect the platform for https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse?at=refs%2Fheads%2Fmy-branch (150ms)
    ✔ should detect the platform for https://bitbucket.org/efftinge/browser-extension-test/commits/ (1378ms)

  Query Selector Tests
    ✔ url (https://gitlab.com/svenefftinge/browser-extension-test) should only match 'gl-repo' (1013ms)
    ✔ url (https://gitlab.com/svenefftinge/browser-extension-test/-/tree/my-branch) should only match 'gl-repo' (657ms)
    ✔ url (https://gitlab.com/filiptronicek/empty) should only match 'gl-repo-empty' (711ms)
    ✔ url (https://gitlab.com/svenefftinge/browser-extension-test/-/merge_requests/1) should only match 'gl-merge-request' (859ms)
    ✔ url (https://gitlab.com/svenefftinge/browser-extension-test/-/issues/1) should only match 'gl-issue' (1121ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test) should only match 'gh-repo' (550ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test/tree/my-branch) should only match 'gh-repo' (142ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test/commit/82d701a9ac26ea25da9b24c5b3722b7a89e43b16) should only match 'gh-commit' (117ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test/issues/1) should only match 'gh-issues' (223ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test/pull/2) should only match 'gh-pulls' (126ms)
    ✔ url (https://github.com/svenefftinge/browser-extension-test/blob/my-branch/README.md) should only match 'gh-file' (223ms)
    ✔ url (https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse) should only match 'bbs-repo' (298ms)
    ✔ url (https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse?at=refs%2Fheads%2Fmy-branch) should only match 'bbs-repo' (134ms)
    ✔ url (https://bitbucket.org/efftinge/browser-extension-test/commits/) should only match 'bb-commits' (1247ms)


  28 passing (19s)

@filiptronicek filiptronicek merged commit 43a0873 into main Jan 27, 2025
1 of 2 checks passed
@filiptronicek filiptronicek deleted the ft/gl-empty-repo branch January 27, 2025 13:50
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