• Stars
    star
    256
  • Rank 158,289 (Top 4 %)
  • Language
    Objective-C
  • Created almost 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Xcode plugin designed for seamless navigation to key GitHub functionalities within your current repository. With just a click, effortlessly access GitHub History, Blame, Pull Requests, Issues, and Notifications, all in a matter of seconds.

Reveal-In-GitHub

Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of current repo in one second.

plugin

My company work on GitHub. I open the GitHub a lot. Sometimes, I am editing on Xcode and do not understand some code, so I go to GitHub to blame them. Sometimes, find the latest commits about a file to help me figure out how the code evolves. So I wonder is there a tool to help me quick open GitHub from Xcode. So I write this plugin. When you editing some source file on Xcode, it's easy to know which GitHub repo you are working on and know which file you are editing. So it makes sense to quickly jump to the file on GitHub, quickly jump to blame the current editing line on GitHub, quickly jump to the issues or prs of the current repo you are working on Xcode.

Menu Items

2015-11-01 12 56 35

It has six menu items:

Menu Title Shortcut GitHub URL Pattern (When I'm editing LZAlbumManager.m Line 40)
Setting ⌃⇧⌘S
Repo ⌃⇧⌘R https://github.com/lzwjava/LZAlbum
Issues ⌃⇧⌘I https://github.com/lzwjava/LZAlbum/issues
PRs ⌃⇧⌘P https://github.com/lzwjava/LZAlbum/pulls
Quick File ⌃⇧⌘Q https://github.com/lzwjava/LZAlbum/blob/fd7224/LZAlbum/manager/LZAlbumManager.m#L40
List History ⌃⇧⌘L https://github.com/lzwjava/LZAlbum/commits/fd7224/LZAlbum/manager/LZAlbumManager.m
Blame ⌃⇧⌘B https://github.com/lzwjava/LZAlbum/blame/fd7224/LZAlbum/manager/LZAlbumManager.m#L40
Notifications ⌃⇧⌘N https://github.com/leancloud/LZAlbum/notifications?all=1

The shortcuts are carefully designed. They will not confict to Xcode default shortcuts. The shortcut pattern is ⌃⇧⌘ (Ctrl+Shift+Command), plus First Character of the menu title.

Customize

Sometimes, you may want to quickly jump to Wiki. Here is the way, open the setting:

2015-11-01 12 56 35

For example,

Quick file, the pattern and the actual url:

           {git_remote_url}       /blob/{commit}/          {file_path}         #{selection}    
https://github.com/lzwjava/LZAlbum/blob/fd7224/LZAlbum/manager/LZAlbumManager.m#L40-L43

The {commit} is the latest commit hash of current branch. It's better then use branch. Because branch's HEAD may be changed. So the code in #L40-L43 may also be changed.

So if you want to add a shortcut to current repo's wiki, just add a menu item and set the pattern to {git_remote_url}/wiki.

In settings, Clear Default Repos say if you have multiple git remotes, when first time to trigger, it will ask you to choose one of them:

Then the plugin remembers which you choose. So when you trigger the menu again, will open that remote repo as the default. The button Clear Default Repos will clear this setting, will ask you to select again.

Install

Recomend install with Alcatraz,

qq20151101-1 2x

Or

  1. Clone this repo.
  2. Open Reveal-In-GitHub.xcodeproj, and build it.
  3. Reveal-In-GitHub.xcplugin should locate at ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
  4. Restart Xcode
  5. Open any GitHub Project and press ⌃⇧⌘B (Ctrl+Shift+Command+B) to blame the code.

安装

推荐使用 Alcatraz,可参考巧神的一遍博客。安装好后,按照上图搜索 Reveal In GitHub,点击 Install 即可。

如果不使用这个工具的话,那么也只需三步:

  • 克隆该项目到本地。
  • 打开 xcodeproj,点击 Build 构建。这会在目录~/Library/Application Support/Developer/Shared/Xcode/Plug-ins 生成 Reveal-In-GitHub.xcplugin 文件。
  • 重启 Xcode,打开任意一个放在 GitHub 上的项目。按下 Ctrl+Shift+Command+B 即可。

Credit

When at the course of developing it, find another plugin ShowInGitHub do something similar. I learn some techique from it. Thanks for that.

License

MIT

More Repositories

1

LZAlbum

Moments based on LeanCloud, use LeanCloud elegantly
Objective-C
428
star
2

Keynotes

Keynotes I shared to the public. The topics contain WebSocket, UnitTest, Git now yet.
Objective-C
236
star
3

OpenSourceNotes

开源项目阅读笔记
129
star
4

leanchat-android

The app LeanChat built with LeanCloud Realtime Messaging SDK.
Java
92
star
5

WeShare

Simple Share App Based On LeanCloud
Java
26
star
6

paul-graham-essays-cn

Paul Graham 文集翻译
13
star
7

LZMembersCell

LZMembersCell 用来展示群成员列表
Objective-C
7
star
8

TabsKiller

A Chrome plugin that automatically kill the oldest tabs when tabs are too many, goodbye messy browser forever
JavaScript
6
star
9

url-shortener

Url Shortener, improved from the example in the book "Clojure Programming" ,use Korma library
Clojure
6
star
10

ppts

4
star
11

flower-recognition

A flower recognition Android application designed to help users identify flowers by capturing photos and drawing circles to aid in recognition.
Java
4
star
12

algorithm-solutions

Problem solutions of some algorithm problems from online judge platforms.
Java
3
star
13

curiosity-courses

Courses
Python
3
star
14

Creak

A Simple and Elegant HTML Parser written in Swift
Swift
2
star
15

LZAlertViewHelper

Use Block instead of UIAlertViewDelegate
Objective-C
2
star
16

mathjax2mobi

Convert feynman lectures online html pages to mobi ebook
Python
2
star
17

user-service

User service provides you the apis about user and role, and its relationship.
Java
2
star
18

EmptyClass

北京林业大学专版,提供二教、一教的空课室信息,方便学生自习
Java
2
star
19

clj-slack

Notify everything to your slack with clojure.
Clojure
2
star
20

lzw-commons

My common util to develop Android app.
Java
2
star
21

LearnJapanese

LearnJapanese
Swift
2
star
22

code-review-web

Vue
2
star
23

code-review-server

CodeReview is a professional platform for code review, communication, and sharing.
PHP
2
star
24

LZConversationCell

LZConversationCell 用来展示最近对话列表,多用在社交 App 中
Objective-C
2
star
25

CampusGlass

People can pick up campus glass where there are some messages witten by others ,then they talk by send messages in the app.
Java
2
star
26

sms-demo

AVOS Cloud 短信验证码服务Android版示例
Java
1
star
27

lvchen.github.io

SCSS
1
star
28

live-bot

Python
1
star
29

live-mobile-web

Fun Live is a cutting-edge knowledge live broadcast platform.
Vue
1
star
30

plan

My plan of everything
C++
1
star
31

test

test-git
Ruby
1
star
32

lzwjava

1
star
33

Share

iOS App , use to share status to friends like facebook, twitter.
Objective-C
1
star
34

lzwjava.github.io

GitHub Pages
Python
1
star
35

bash-util

Linux bash util to let you more efficient
Shell
1
star
36

two

An app.People download it from a website,then get a "unique" app, only people who install it can talk to each other.
Java
1
star
37

neural-networks-and-zhiwei-learning

Learning and practice project
Python
1
star