Skip to content

Commit d0601a0

Browse files
committed
Add basic extension
1 parent 4732f60 commit d0601a0

15 files changed

+1337
-115
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
out/
2+
.vscode-test
3+
*.vsix

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Change Log
2-
All notable changes to the "githubinator" extension will be documented in this file.
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
33

4-
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
56

67
## [Unreleased]
7-
- Initial release
8+
9+
## 0.1.0 - 2019-02-28
10+
### Added
11+
- Basic extension with github support

LICENSE

+674
Large diffs are not rendered by default.

README.md

+43-39
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,69 @@
1-
# githubinator README
1+
# githubinator
22

3-
This is the README for your extension "githubinator". After writing up a brief description, we recommend including the following sections.
3+
VSCode plugin that shows selected text on remote GitHub or Bitbucket repo
44

55
## Features
66

7-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
7+
![feature X](images/githubinator.png)
88

9-
For example if there is an image subfolder under your extension project workspace:
9+
### Commands
1010

11-
\!\[feature X\]\(images/feature-x.png\)
12-
13-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
11+
command|copy url|open url|mode|SHA-type
12+
--|--|--|--|--
13+
`Githubinator`|y|y|blob|current branch
14+
`Githubinator: Copy`|n|y|blob|current branch
15+
`Githubinator: Copy Master`|n|y|blob|master branch
16+
`Githubinator: Copy Permalink`|n|y|blob|current SHA
17+
`Githubinator: Copy Master Permalink`|n|y|blob|master SHA
18+
`Githubinator: On Master`|y|y|blob|master branch
19+
`Githubinator: Permalink`|y|y|blob|current SHA
20+
`Githubinator: Blame`|y|y|blame|current branch
21+
`Githubinator: Blame On Master`|y|y|blame|master branch
22+
`Githubinator: Blame Permalink`|y|y|blame|current sha
23+
`Githubinator: Repository`|y|y|open repo|N/A
1424

1525
## Requirements
1626

17-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
27+
- Local Git repository. You must have a git repository configured with a remote. (`"origin"` is default but this can be changed in settings).
1828

1929
## Extension Settings
2030

21-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22-
23-
For example:
24-
25-
This extension contributes the following settings:
26-
27-
* `myExtension.enable`: enable/disable this extension
28-
* `myExtension.thing`: set to `blah` to do something
31+
* `githubinator.default_remote`: The default remote branch for a repository. (default: `"origin"`)
32+
* `githubinator.providers.github`: The hostname for identifying a github origin and building a url. (default: `"github.com"`)
2933

3034
## Known Issues
3135

32-
Calling out known issues can help limit users opening duplicate issues against your extension.
33-
34-
## Release Notes
35-
36-
Users appreciate release notes as you update your extension.
37-
38-
### 1.0.0
36+
- Only Github is supported as a remote provider at the moment.
3937

40-
Initial release of ...
38+
## TODO
39+
- [ ] Add Gitlab, Bitbucket, VisualStudio support providers
40+
- [ ] Add ability to open PR associated with commit, if possible without github API
41+
- [ ] Replace testing setup with Jest
42+
- [ ] Setup CI
43+
- [ ] Document deployment/publishing
44+
- [ ] Improve README
4145

42-
### 1.0.1
43-
44-
Fixed issue #.
46+
## Release Notes
4547

46-
### 1.1.0
48+
### 0.1.0
4749

48-
Added features X, Y, and Z.
50+
Initial release
4951

50-
-----------------------------------------------------------------------------------------------------------
5152

52-
## Working with Markdown
53+
## Prior Art
54+
This plugin is based on the [Sublime Plugin by ehamiter](https://github.com/ehamiter/GitHubinator) with the same name.
5355

54-
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
56+
project|providers|blame|history|permalink|master|copy|open|open-pr|one-step actions| provider autodetection
57+
---|---|---|---|---|--|---|--|--|--|--
58+
this project|github|y|n|y|y|y|y|n|y|y|n
59+
[d4rkr00t/vscode-open-in-github][d4rkr00t-github] ([vscode][d4rkr00t-vscode])|github|y|y|n|y|n|y|n|n|n
60+
[ziyasal/vscode-open-in-github][ziyasal-github] ([vscode][ziyasal-vscode])|github, bitbucket, gitlab, visualstudio|n|n|n*|n|y|y|y|y|n
5561

56-
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
57-
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
58-
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
62+
\* changable in settings between permalink and branch
5963

60-
### For more information
6164

62-
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63-
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
6465

65-
**Enjoy!**
66+
[d4rkr00t-github]:https://github.com/d4rkr00t/vscode-open-in-github
67+
[d4rkr00t-vscode]:https://marketplace.visualstudio.com/items?itemName=sysoev.vscode-open-in-github
68+
[ziyasal-github]:https://github.com/ziyasal/vscode-open-in-github
69+
[ziyasal-vscode]:https://marketplace.visualstudio.com/items?itemName=ziyasal.vscode-open-in-github

images/githubinator.png

200 KB
Loading

package.json

+174-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,176 @@
11
{
2-
"name": "githubinator",
3-
"displayName": "Githubinator",
4-
"description": "plugin that shows selected text on remote GitHub or Bitbucket repo",
5-
"version": "0.0.1",
6-
"engines": {
7-
"vscode": "^1.31.0"
8-
},
9-
"categories": [
10-
"Other"
11-
],
12-
"activationEvents": [
13-
"onCommand:extension.helloWorld"
14-
],
15-
"main": "./out/extension.js",
16-
"contributes": {
17-
"commands": [{
18-
"command": "extension.helloWorld",
19-
"title": "Hello World"
20-
}]
21-
},
22-
"scripts": {
23-
"vscode:prepublish": "yarn run compile",
24-
"compile": "tsc -p ./",
25-
"watch": "tsc -watch -p ./",
26-
"postinstall": "node ./node_modules/vscode/bin/install",
27-
"test": "yarn run compile && node ./node_modules/vscode/bin/test"
28-
},
29-
"devDependencies": {
30-
"typescript": "^3.3.1",
31-
"vscode": "^1.1.28",
32-
"tslint": "^5.12.1",
33-
"@types/node": "^10.12.21",
34-
"@types/mocha": "^2.2.42"
35-
}
2+
"name": "githubinator",
3+
"displayName": "Githubinator",
4+
"description": "plugin that shows selected text on remote GitHub or Bitbucket repo",
5+
"version": "0.0.1",
6+
"publisher": "chdsbd",
7+
"license": "SEE LICENSE IN LICENSE",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/chdsbd/vscode-githubinator.git"
11+
},
12+
"engines": {
13+
"vscode": "^1.31.0"
14+
},
15+
"categories": [
16+
"Other"
17+
],
18+
"activationEvents": [
19+
"onCommand:extension.githubinator",
20+
"onCommand:extension.githubinatorCopy",
21+
"onCommand:extension.githubinatorCopyMaster",
22+
"onCommand:extension.githubinatorCopyPermalink",
23+
"onCommand:extension.githubinatorCopyMasterPermalink",
24+
"onCommand:extension.githubinatorOnMaster",
25+
"onCommand:extension.githubinatorPermalink",
26+
"onCommand:extension.githubinatorBlame",
27+
"onCommand:extension.githubinatorBlameOnMaster",
28+
"onCommand:extension.githubinatorBlamePermalink",
29+
"onCommand:extension.githubinatorRepository"
30+
],
31+
"main": "./out/extension.js",
32+
"contributes": {
33+
"commands": [
34+
{
35+
"command": "extension.githubinator",
36+
"title": "Githubinator"
37+
},
38+
{
39+
"command": "extension.githubinatorCopy",
40+
"title": "Copy",
41+
"category": "Githubinator"
42+
},
43+
{
44+
"command": "extension.githubinatorCopyMaster",
45+
"title": "Copy Master",
46+
"category": "Githubinator"
47+
},
48+
{
49+
"command": "extension.githubinatorCopyPermalink",
50+
"title": "Copy Permalink",
51+
"category": "Githubinator"
52+
},
53+
{
54+
"command": "extension.githubinatorCopyMasterPermalink",
55+
"title": "Copy Master Permalink",
56+
"category": "Githubinator"
57+
},
58+
{
59+
"command": "extension.githubinatorOnMaster",
60+
"title": "On Master",
61+
"category": "Githubinator"
62+
},
63+
{
64+
"command": "extension.githubinatorPermalink",
65+
"title": "Permalink",
66+
"category": "Githubinator"
67+
},
68+
{
69+
"command": "extension.githubinatorBlame",
70+
"title": "Blame",
71+
"category": "Githubinator"
72+
},
73+
{
74+
"command": "extension.githubinatorBlameOnMaster",
75+
"title": "Blame On Master",
76+
"category": "Githubinator"
77+
},
78+
{
79+
"command": "extension.githubinatorBlamePermalink",
80+
"title": "Blame Permalink",
81+
"category": "Githubinator"
82+
},
83+
{
84+
"command": "extension.githubinatorRepository",
85+
"title": "Repository",
86+
"category": "Githubinator"
87+
}
88+
],
89+
"menus": {
90+
"editor/context": [
91+
{
92+
"command": "extension.githubinator",
93+
"group": "githubinator@1"
94+
},
95+
{
96+
"command": "extension.githubinatorCopy",
97+
"group": "githubinator@2"
98+
},
99+
{
100+
"command": "extension.githubinatorCopyMaster",
101+
"group": "githubinator@3"
102+
},
103+
{
104+
"command": "extension.githubinatorCopyPermalink",
105+
"group": "githubinator@4"
106+
},
107+
{
108+
"command": "extension.githubinatorCopyMasterPermalink",
109+
"group": "githubinator@5"
110+
},
111+
{
112+
"command": "extension.githubinatorOnMaster",
113+
"group": "githubinator@6"
114+
},
115+
{
116+
"command": "extension.githubinatorPermalink",
117+
"group": "githubinator@7"
118+
},
119+
{
120+
"command": "extension.githubinatorBlame",
121+
"group": "githubinator@8"
122+
},
123+
{
124+
"command": "extension.githubinatorBlameOnMaster",
125+
"group": "githubinator@9"
126+
},
127+
{
128+
"command": "extension.githubinatorBlamePermalink",
129+
"group": "githubinator@10"
130+
},
131+
{
132+
"command": "extension.githubinatorRepository",
133+
"group": "githubinator@11"
134+
}
135+
]
136+
},
137+
"configuration": {
138+
"type": "object",
139+
"title": "Githubinator configuration",
140+
"properties": {
141+
"githubinator.default_remote": {
142+
"type": "string",
143+
"default": "origin",
144+
"description": "The remote branch for a repository."
145+
},
146+
"githubinator.providers.github": {
147+
"type": "string",
148+
"default": "github.com",
149+
"description": "The hostname for identifying a github origin and building a url."
150+
}
151+
}
152+
}
153+
},
154+
"scripts": {
155+
"vscode:prepublish": "yarn run compile",
156+
"compile": "tsc -p ./",
157+
"watch": "tsc -watch -p ./",
158+
"postinstall": "node ./node_modules/vscode/bin/install",
159+
"test": "yarn run compile && node ./node_modules/vscode/bin/test"
160+
},
161+
"devDependencies": {
162+
"@types/ini": "^1.3.30",
163+
"@types/mocha": "^2.2.42",
164+
"@types/mz": "^0.0.32",
165+
"@types/node": "^10.12.21",
166+
"prettier": "^1.16.4",
167+
"tslint": "^5.12.1",
168+
"typescript": "^3.3.1",
169+
"vscode": "^1.1.28"
170+
},
171+
"dependencies": {
172+
"gitconfiglocal": "^2.1.0",
173+
"ini": "^1.3.5",
174+
"mz": "^2.7.0"
175+
}
36176
}

0 commit comments

Comments
 (0)