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

Fix incorrect selector causing the MR button to not show up in GitLab #158

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@ image:
file: .gitpod.Dockerfile

tasks:
- init: |
- name: install node version
init: |
nvm install 20
nvm use 20
nvm uninstall 16
npm install -g pnpm
gp sync-done node

# Without nodeJS 20 installed, the "sharp" package won't bundle properly,
# so wait until the node update is finished in the prebuild.
- name: build package
init: |
gp sync-await node
pnpm install
pnpm build
pnpm build-dev-tools
pnpm test
command: |
pnpm build

ports:
- name: sync
port: 8080
Expand Down
4 changes: 2 additions & 2 deletions src/button/button-contributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ export const buttonContributions: ButtonContributionParams[] = [
exampleUrls: ["https://gitlab.com/svenefftinge/browser-extension-test/-/merge_requests/1"],
match: /\/merge_requests\//,
selector:
"#content-body > div.merge-request > div.detail-page-header.border-bottom-0.gl-block.gl-pt-5.sm\\:\\!gl-flex.is-merge-request > div.detail-page-header-actions.gl-self-start.is-merge-request.js-issuable-actions.gl-flex.gl-mt-1 > div",
"body[data-project-id] div.detail-page-header-actions.is-merge-request > div",
containerElement: createElement("div", { marginLeft: "8px", marginRight: "-8px" }),
application: "gitlab",
insertBefore:
"#content-body > div.merge-request > div.detail-page-header.border-bottom-0.gl-block.gl-pt-5.sm\\:\\!gl-flex.is-merge-request > div.detail-page-header-actions.gl-self-start.is-merge-request.js-issuable-actions.gl-flex.gl-mt-1 > div > div",
"body[data-project-id] div.detail-page-header-actions.is-merge-request > div > div",
manipulations: [
{
// make the clone button secondary
Expand Down