Skip to content

Commit

Permalink
Merge pull request #6 from pt1602/feature/prepare-release-1-3-0
Browse files Browse the repository at this point in the history
docs(core): updated version number and improved README.md
  • Loading branch information
pt1602 authored Oct 21, 2022
2 parents 7172ab9 + 1f8fc9c commit 563fa25
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@

# Gitlab "git clone …"

Simple chrome extension, that adds "git clone" before the source.
Simple Google Chrome extension, which adds some minor tweaks to make working with Gitlab a little better.

![Screenshot Gitlab](assets/readme-ressources/gitlab-git-clone.png "Screenshot Gitlab")
---

## Current Features

It adds "git clone" before the repository source.

![Screenshot Git Clone](assets/readme-ressources/gitlab-git-clone.png "Screenshot Git Clone")

and also a _Checkout_ button on the Merge-Request page to copy the branch name plus a _git checkout_ before it.

![Screenshot Merge Request](assets/readme-ressources/gitlab-merge-request.png "Screenshot Merge Request")

---

## How to install?

Expand Down
Binary file added assets/readme-ressources/gitlab-merge-request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let cloneOptionsDropdown = document.querySelectorAll('.clone-options-dropdown >
let mobileCloneButtons = document.querySelector('.mobile-git-clone .clone-dropdown-btn');
const currentPath = window.location.pathname;
const beforeVal = 'git clone ';
const copyNameBtnVal = 'Copy branch name';
const copyNameBtnVal = 'Checkout';
const copyNameBtnClasses = 'gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped';
let branchNameEl;
function modifyMobileCloneButtons() {
Expand All @@ -18,10 +18,10 @@ function createCopyBranchNameButton(branchNameEl) {
cloneBranchNameBtn.innerText = copyNameBtnVal;
if (branchName) {
cloneBranchNameBtn.addEventListener('click', () => {
navigator.clipboard.writeText(branchName).then(() => {
/* success */
navigator.clipboard.writeText('git checkout ' + branchName).then(() => {
/* success - do nothing */
}, () => {
/* failure */
/* failure - do nothing */
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Gitlab Git Clone",
"description": "Adds 'git clone' to the ssh/https clone url, so you simply can copy and paste it into your terminal.",
"version": "1.2",
"version": "1.3",
"manifest_version": 3,
"content_scripts": [
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitlab-gitclone",
"version": "1.2.0",
"version": "1.3.0",
"description": "Adds 'git clone' to the ssh/https clone url, so you simply can copy and paste it into your terminal.",
"main": "./js/frontend.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions ts/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let cloneOptionsDropdown: NodeList | null = document.querySelectorAll('.clone-op
let mobileCloneButtons: HTMLElement | null = document.querySelector('.mobile-git-clone .clone-dropdown-btn');
const currentPath: string = window.location.pathname;
const beforeVal: string = 'git clone ';
const copyNameBtnVal: string = 'Copy Branch Name';
const copyNameBtnVal: string = 'Checkout';
const copyNameBtnClasses: string = 'gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped';
let branchNameEl: HTMLElement | null;

Expand All @@ -20,7 +20,7 @@ function createCopyBranchNameButton(branchNameEl: HTMLElement) {

if (branchName) {
cloneBranchNameBtn.addEventListener('click', () => {
navigator.clipboard.writeText(branchName).then(
navigator.clipboard.writeText('git checkout ' + branchName).then(
() => {
/* success - do nothing */
},
Expand Down

0 comments on commit 563fa25

Please sign in to comment.