Github Github Github
Github Github Github
uses
i l d
github
zach holman
to b u
to b
how
uses
u i l d x
github
how github
uses github
to build github
how
uses github
to build
how
uses github
to build
how your company
uses github
to build your product
@holman
we work
asynchronously
WORKING ASYNCHRONOUSLY:
YOU CAN DO SHIT WITHOUT NEEDING TO
PULL ME OUT OF THE ZONE™.
NO MEETINGS • NO DEADLINES • NO MANAGERS
CHATROOMS
NO PRESENCE NEEDED
TIME FLEXIBILITY
WORK WHEN YOU WANT TO WORK
HOW GITHUB WORKS
zachholman.com/posts/how-github-works
OKAY LET’S TALK ABOUT
PULL REQUESTS + BRANCHING
ISSUES
OAUTH AS IDENTITY
HOOKS & HUBOT
SECRETS
pull requests
+ branching
Y’all got some weird branches.
master
deploy-62
deploy-63
deploy-63b
? deploy-
REPOSITORY
ʘ‿ʘ ಠ_ಠ
TRUSTED SHITTY
DEVELOPERS DEVELOPERS
BRANCH
Everyone can push, everyone can deploy.
Frees up your time from
micromanaging someone else’s code.
Master is always deployable.
Master is always deployable. We deploy
10-40 times a day.
If you’re nervous, deploy to staging.
Or deploy a branch. Or deploy to a subset
of our production boxes.
TWITTER-DRIVEN DEVELOPMENT
CHECK TWITTER, SEE IF YOU BONED A DEPLOY
Keep your branches simple.
ಠ_ಠ
What about code quality?
REQUESTS
PULL
OOH! FUTUR
ISTIC!
Pull Requests are our code review.
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
WHAT
ARE PULL REQUESTS?
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
DISCUSSIONS DISCUSSIONS DISCUSSIONS DISCUS
CODE DISCUSSION
FEATURE DISCUSSION
STRATEGY DISCUSSION
REFERENCE ISSUES
REVIEW CODE DIFFS
WRITE CODE COMMENTS
ALL
ON
A BR
STRATEGY DISCUSSION
FEATURE DISCUSSION
CODE DISCUSSION
ANC
H
REFERENCE ISSUES
REVIEW CODE DIFFS
WRITE CODE COMMENTS
TITLE OF THE PULL REQUEST
DESCRIPTION
COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS
DISCUSS DISCUSS DISCUSS DISCUSS DISCUSS
COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT COMMIT
talk about changes
show all commits
show specific code changes
MASTER
BRANCH
MASTER
PULL REQUEST
BRANCH
BIG S
ECRE
T #1
PULL REQUESTS:
YOU DON’T NEED
TO FORK ANYTHING.
4
WHY PULL REQUESTS ARE RAD:
REASONS
WHY PULL REQUESTS ARE RAD: ASYNCHRONOUS
No meetings.
WHY PULL REQUESTS ARE RAD: NOTIFICATIONS
{ 8 months,
couple hundred commits,
dozens of mockups
Pull Requests are
about getting shit done
without wasting a lot of time.
Can your workflow be improved?
Do you really need all that process?
PULL
REQU
EST
RECA
P
SIMPLE TOOLS
MEANS MORE TIME BUILDING
YOUR PRODUCT
oauth as identity
RUBY IS SO FAST
FUCK
I LOVE IT
SO MUCH
♥
~/Development/SECRETARYOFLABOR
was super hammered when I wrote this
single LABOR.RB web app
self-referential symlink `what`
~/Development/unmarked_van
an app that stalks people’s locations
~/Development/trace
real-time stats graphing
internal ios licensing + haystack
30
talk videos provisioning exceptions
INTERNAL APPS
continuous internal arbitrary
integration twitter data store
Outsiders are
not welcome.
GitHub as Authentication
TEAMS, ORGANIZATIONS, AND USERS
GitHub as Authentication
USE OAUTH TO AUTHENTICATE USERS
github.com/atmos/sinatra_auth_github
github_organization_access?('github')
# => true
GitHub as Authentication
SECURITY • CONSISTENCY • COOLICTY
OAU
TH RE
CAP
U
MP
A
H LY C
I END
R FR
O U
OVER 300 COMMANDS, LIKE...
• deploy every GitHub app
• run branch-level tests
• play music in the office
• tell us who is in the office
• dynamically build usage graphs
• send and receive text messages
• mustache every image posted in chat
• track who swears each day
• rank by twitter followers
• ...and way, way more
L J K
LO
Hubot is not open source.
github.com/github/hubot
bots ♥ github: know your branch status
Zach
hubot what hasn’t been deployed?
Hubot
Zach: Here's what hasn't been deployed on master yet:
https://github.com/github/github/compare/{sha}...master
bots ♥ github: know your branch status
Zach
hubot what hasn’t been deployed on issues2?
Hubot
Zach: Here's what hasn't been deployed on issues2 yet:
https://github.com/github/github/compare/{sha}...issues2
bots ♥ github: know your branch status
Zach
hubot what hasn’t been deployed on issues2?
Hubot
Zach: Here's what hasn't been deployed on issues2 yet:
https://github.com/github/github/compare/{sha}...issues2
bots ♥ github: know your branch status
Zach
hubot what hasn’t been deployed on issues2?
Hubot
Zach: Here's what hasn't been deployed on issues2 yet:
https://github.com/github/github/compare/{sha}...issues2
bots ♥ github: know your branch status
https://github.com/site/sha
#=> 2c8c2e9932d0caceecd3ed8ee2adcda0ece3e564
bots ♥ github: using the API
Zach
hubot what are the pulls on holman/boom?
Hubot
HTTParty should only be a soft dependency
(master...jimmycuadra:soft-dependency) by jimmycuadra
https://github.com/holman/boom/pull/46
boom roulette (master...culvr:master) by culvr
https://github.com/holman/boom/pull/43
bots ♥ github: using the API
Zach
hubot how many issues did we close today for github/github?
Hubot
13 issues closed on github/github in the past 24 hours.
bots ♥ github
.diff + .patch
after most URLs
FENCED CODE
IT’S LIKE CODE BUT WITH MORE FENCES
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
FENCED CODE
IT’S LIKE CODE BUT WITH MORE FENCES
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
FENCED CODE
IT’S LIKE CODE BUT WITH MORE FENCES
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
MENTIONS
GET SOMEONE ELSE TO DO YOUR WORK
pull requests
@username issues
commits
WHITESPACE
IT SUCKS
?w=1
add
to URLs
REPO REFERENCES
AROUND THE REPO, AROUND THE REPO, AROUND
user/repo#issue
GIT.IO
OFFICIAL LAUNCH ANNOUNCEMENT
https://github.com/holman/really-
fucking-long-url-wtf-is-u-doing
git.io/url
GIT.IO
OFFICIAL LAUNCH ANNOUNCEMENT