Skip to content

Hotfix: Swap uppercase/lowercase for ssh feature - #123

Merged
paulirish merged 1 commit into
paulirish:masterfrom
derimagia:uppercase-bash-3
Apr 30, 2018
Merged

paulirish merged 1 commit into
paulirish:masterfrom
derimagia:uppercase-bash-3

Conversation

@derimagia

@derimagia derimagia commented Apr 29, 2018 •

Copy link
Copy Markdown
Collaborator

Fix for #122

@4U6U57

4U6U57 commented Apr 29, 2018 •

Copy link
Copy Markdown
Contributor

Tested locally, looks good.

View smoke test
[avalera:~/git-open] master*
± git fetch upstream pull/123/head:123-pr
remote: Counting objects: 3, done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (3/3), done.
From github.com:paulirish/git-open
 * [new ref]         refs/pull/123/head -> 123-pr

[avalera:~/git-open] master*
± git checkout 123-pr
Switched to branch '123-pr'

[avalera:~/git-open] 123-pr*
± git remote -v
origin  gitlab:4U6U57/git-open (fetch)
origin  gitlab:4U6U57/git-open (push)
upstream        git@github.com:paulirish/git-open.git (fetch)
upstream        git@github.com:paulirish/git-open.git (push)

[avalera:~/git-open] 123-pr*
± BROWSER=echo git open
https://gitlab.com/4U6U57/git-open/tree/123-pr
View unit test
[avalera:~/git-open] 123-pr*
± npm test

> git-open@2.0.0 test /home/avalera/git-open
> npm run unit && npm run lint:package && npm run lint:man && npm run lint:readme && npm run lint:editorconfig


> git-open@2.0.0 unit /home/avalera/git-open
> bats test/

 ✓ test environment
 ✓ help text
 ✓ invalid option
 ✓ url: insteadOf handling
 ✓ gh: basic
 ✓ gh: branch
 ✓ gh: non-origin remote
 ✓ gh: without git user
 ✓ gh: ssh origin
 ✓ gh: git protocol origin
 ✓ gh: git open --issue
 ✓ gh: gist
 ✓ basic: # and % in branch names are URL encoded
 ✓ basic: tracked remote is default
 ✓ basic: https url can contain port
 ✓ basic: ssh url has port removed from http url
 ✓ basic: http url scheme is preserved
 ✓ sshconfig: basic
 ✓ sshconfig: no action on no match
 ✓ sshconfig: check case sensitivity
 ✓ sshconfig: multitarget host
 ✓ sshconfig: host substitution in hostname
 ✓ sshconfig: host wildcard * matches zero or more chars
 ✓ sshconfig: host wildcard ? matches exactly one char
 ✓ sshconfig: overriding host rules
 ✓ bitbucket: basic
 ✓ bitbucket: non-origin remote
 ✓ bitbucket: open source view
 ✓ bitbucket: open source view with a slash/branch
 ✓ bitbucket: ssh:// clone urls
 ✓ bitbucket: no username@ in final url
 ✓ bitbucket: Bitbucket Server
 ✓ bitbucket: Bitbucket Server branch
 ✓ bitbucket: Bitbucket Server private user repos
 ✓ bitbucket: Bitbucket Server with different root context
 ✓ bitbucket: Bitbucket Server with different root context with multiple parts
 ✓ bitbucket: Bitbucket Server private user repos with different root context
 ✓ gitlab: default ssh origin style
 ✓ gitlab: ssh://git@ origin
 ✓ gitlab: separate domains
 ✓ gitlab: special domain and path
 ✓ gitlab: different port
 ✓ vsts: https url
 ✓ vsts: ssh url
 ✓ vsts: on-premises tfs http url
 ✓ vsts: branch
 ✓ vsts: on-premises tfs branch
 ✓ vsts: issue
 ✓ vsts: default project repository - issue

49 tests, 0 failures

> git-open@2.0.0 lint:package /home/avalera/git-open
> pjv --recommendations --warnings

{ valid: true }

> git-open@2.0.0 lint:man /home/avalera/git-open
> markdownlint --config markdownlint.json git-open.1.md


> git-open@2.0.0 lint:readme /home/avalera/git-open
> markdownlint --config markdownlint.json README.md


> git-open@2.0.0 lint:editorconfig /home/avalera/git-open
> eclint check git-open* readme* .travis.yml

@paulirish
paulirish merged commit 995e915 into paulirish:master Apr 30, 2018
@derimagia
derimagia deleted the uppercase-bash-3 branch March 4, 2019 16:19
iblea pushed a commit to iblea/git-open that referenced this pull request Jun 17, 2024
maooc pushed a commit to maooc/git-open that referenced this pull request Mar 22, 2026
This commit adds three major enhancements to git-open:

1. --pull-request / -r: Open PR/MR list page
   - Supports GitHub (/pulls), GitLab (/-/merge_requests),
     Bitbucket (/pull-requests), Azure DevOps (/_git/pullrequests),
     and cnb.cool (/-/merge_requests)

2. --path: Open current directory path in browser
   - Automatically uses current working directory relative to repo root
   - Works without requiring --file parameter

3. Enhanced --issue: Support multiple branch name formats
   - issue/123, issues/123
   - bugfix-123, bugfix/123
   - feature-123, feature/123
   - fix-123, fix/123
   - hotfix-123, hotfix/123
   - paulirish#123 (pure number with hash)
   - Shows clear error message when format is not recognized

Also updates README.md, git-open.1.md documentation and adds
comprehensive BATS tests for all new features.

Modified by Kimi AI model.
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.

3 participants