SlideShare a Scribd company logo
How We Learned To Stop Worrying
And Love (Or At Least Live With)
GitHub
Open Source Bridge 2015
Jen Griffin (@kareila)
Athena Yao (@afuna)
Dreamwidth Studios (dreamwidth.org)
How We Learned To Stop Worrying
And Love (Or At Least Live With)
GitHub
These slides may be downloaded
from
http://slideshare.net/dreamwidth
Our code may be downloaded from
https://github.com/afuna/ghi-assist
What Is GitHub?
GitHub is the most widely used platform
for managing open source projects. It
provides:
• source code management
• issue management (aka bug tracking)
• collaboration tools
Anyone can easily sign up for a free
account, modify a copy of an open source
project, and request for their changes to
be accepted.
How We Learned To Stop Worrying And Love (or at least live with) GitHub
How We Learned To Stop Worrying And Love (or at least live with) GitHub
Why Use GitHub?
Strengths Weaknesses
• popularity / ubiquity
• ease of use
• powerful features
• limited/difficult
customization
• Git (SCM) is hard
• all-or-nothing permissions
It is possible to use GitHub as a basic
code repository and use other products
for the rest of your project’s workflow.
Case History: Dreamwidth
• 2008: self-hosted Mercurial + Bugzilla
• 2012: GitHub + Bugzilla
• 2014: GitHub only
Our code’s migration was planned and
orderly.
Switching issue trackers was not.
How We Learned To Stop Worrying And Love (or at least live with) GitHub
Why Did We Wait?
• More Flexible, Powerful Metadata
• Easier Drop-In Contributions
• Better Permissions & Privacy
Bottom line: Bugzilla is a more fully featured
bug tracker than GitHub Issues.
Considering Our Options
• Start again with Bugzilla - rejected because we
didn’t want to continue self-hosting
• Use a different hosted bug tracker - rejected
because we couldn’t find anything that fit our
needs (YMMV)
• Set up an issues-only GitHub repo with admin
access for all - rejected as messy and confusing
• What we finally decided - use GitHub Issues
normally and do our best to work around rough
spots
How We Learned To Stop Worrying And Love (or at least live with) GitHub
GitHub Permissions (For
Teams)
• Anyone: can browse, create and comment
on issues, fork the code, and submit pull
requests.
• Members: can also have issues assigned
to them by admins and be referenced by
name in comments.
• Admins: can commit code changes and
make changes to issues, including labels
and assignments.
Permissions: What We Wanted
• Anyone: can browse, create and comment
on issues, fork the code, and submit pull
requests.
• Members: can also assign issues to
themselves, be referenced by name in
comments, and categorize existing issues
with labels.
• Admins: can commit code changes and
make changes to issues, including labels
and assignments.
Enter The API
GitHub provides a programming interface for
interacting with issues and pull requests:
https://developer.github.com/
Notifications are sent when items are
opened, closed, or commented on. Since
anyone can comment, anyone can trigger
API actions via specially formatted
comments!
How It Works
• The service is similar to a chatbot. It
listens for GitHub API events and
responds as desired.
• In order to execute the requested actions,
it will need to be linked to a GitHub
account that has access to commit the
changes.
• You will probably want to give it a name
that makes clear it is an automated
process.
Currently Defined Actions
Assign Related Issue: If a pull request claims to fix
an issue, assign the issue to the author
Claim Issue: Assign[*] issue to anyone who leaves
a comment saying “claim”, “claiming” or
“claimed”
Add Labels: Labels can be added via comments
by prefixing the name of the label (##labelname)
Stop! Demo Time!
Flow of Control
How We Learned To Stop Worrying And Love (or at least live with) GitHub
Anatomy of a Webhook
1. Verify request came from GitHub
2. Determine event type
3. Do some action based on the payload
contents
def signature_valid(self, data=None,
signed_data=None, digest=sha1):
mac = hmac.new(self.secret, msg=data,
digestmod=digest)
try:
return hmac.compare_digest(
mac.hexdigest(), signed_data)
except AttributeError:
# < Python 2.7.7
return mac.hexdigest() == signed_data
signature_header = request.headers.get(
'X-Hub-Signature')
digest, signature = signature_header.split('=’)
if digest != "sha1":
abort(501, "'%s' not supported." % digest)
if not webhook.signature_valid(
data=request.body.read(),
signed_data=signature):
abort(403, "Signature does not match
expected value.")
Anatomy of a Webhook
1. Verify request came from GitHub
2. Determine event type
3. Do some action based on the payload
contents
event = request.headers.get(
'X-GitHub-Event')
Anatomy of a Webhook
1. Verify request came from GitHub
2. Determine event type
3. Do some action based on the payload
contents
CLAIM_PATTERN =
re.compile(r'bclaim(?:ed|ing)?b', re.I)
class ClaimHook(Hook):
def should_perform_action(self, payload,
api):
if payload["issue"]["assignee"] is None 
and CLAIM_PATTERN.search(
payload["comment"]["body"]):
return True
else:
return False
headers = {
'User-Agent': "GHI Assist Bot",
'Authorization': "token %s" % self.token,
}
response = requests.request("PATCH",
"https://api.github.com…",
headers=headers,
data=json.dumps({"assignee": assignee})
)
Resources
Code for our GitHub assistant:
https://github.com/afuna/ghi-assist
GitHub’s API reference:
https://developer.github.com/
Download link for our slides:
http://slideshare.net/dreamwidth
Any Questions?
You can find us on
Dreamwidth, GitHub, and Twitter:
Jen Griffin (kareila@dreamwidth.org)
Athena Yao (afuna@dreamwidth.org)
Thank you for coming!

More Related Content

PPTX
OSB15
PDF
Improving Dashboards with open content sharing
PPTX
OpenStack Documentation in the Open
PDF
The Open Web
PPTX
Collaborating on GitHub for Open Source Documentation
PPTX
Automated Acceptance Tests & Tool choice
PPTX
Automated Acceptance Tests in .NET
PDF
GitHub Workflows for Technical Communication
OSB15
Improving Dashboards with open content sharing
OpenStack Documentation in the Open
The Open Web
Collaborating on GitHub for Open Source Documentation
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests in .NET
GitHub Workflows for Technical Communication

What's hot (18)

PDF
Design Microservice Architectures the Right Way
PDF
Production - Designing for Testability
PDF
NYC Continuous Delivery Meetup - Introducing delta
PPTX
Get your Git on GitHub
PDF
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
PDF
Collaborating on GitHub for Open Source Documentation
PDF
Gopher Taiwan Gathering #16: Build a smart bot via Golang
PDF
基於 Flow & Path 的 MVP 架構
PPTX
Robolectric Adventure
PDF
crashing in style
PPTX
Technical Seminar Series: GIT Pull Requests Best Practices
PPTX
Bdd and spec flow
PPTX
Chegg - iOS @ Scale
PPTX
Breaking Dependencies to Allow Unit Testing
PPTX
Setting Up CircleCI Workflows for Your Salesforce Apps
PDF
GraphQL 101
PPTX
Mastering git
PPTX
REST API testing with SpecFlow
Design Microservice Architectures the Right Way
Production - Designing for Testability
NYC Continuous Delivery Meetup - Introducing delta
Get your Git on GitHub
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Collaborating on GitHub for Open Source Documentation
Gopher Taiwan Gathering #16: Build a smart bot via Golang
基於 Flow & Path 的 MVP 架構
Robolectric Adventure
crashing in style
Technical Seminar Series: GIT Pull Requests Best Practices
Bdd and spec flow
Chegg - iOS @ Scale
Breaking Dependencies to Allow Unit Testing
Setting Up CircleCI Workflows for Your Salesforce Apps
GraphQL 101
Mastering git
REST API testing with SpecFlow
Ad

Similar to How We Learned To Stop Worrying And Love (or at least live with) GitHub (20)

PDF
Github github-github
PPTX
Introduction to github slideshare
PPTX
Understanding Github and Version Control System.pptx
PDF
Introducing GitHub 1st Edition Peter Bell
PDF
Building Tools with GitHub Customize Your Workflow 1st Edition Chris Dawson
PDF
O'Leary - Using GitHub for Enterprise and Open Source Documentation
PDF
Intro to Git, GitHub, and Devpost
PDF
Introducing GitHub 1st Edition Peter Bell
PPTX
Github
PDF
Git Hub Platform
PDF
Introducing Github 1st Edition Peter Bell Brent Beer
PDF
A Git MVP Workflow
PDF
Best 7 Easy Ways To Buy GitHub Accounts in Proven Project.pdf
PDF
Best 7 Easy Ways To Buy GitHub Accounts in Proven Project.pdf
PDF
Contributing to github is for everyone
PDF
August OpenNTF Webinar - Git and GitHub Explained
PDF
What Is GitHub.pdf in united state of amarica
PPTX
Introduction to Git and Github
PDF
Buy GitHub Account- 100% Secure Guarantee
PDF
Buy GitHub Account with 5% discount now In 2025
Github github-github
Introduction to github slideshare
Understanding Github and Version Control System.pptx
Introducing GitHub 1st Edition Peter Bell
Building Tools with GitHub Customize Your Workflow 1st Edition Chris Dawson
O'Leary - Using GitHub for Enterprise and Open Source Documentation
Intro to Git, GitHub, and Devpost
Introducing GitHub 1st Edition Peter Bell
Github
Git Hub Platform
Introducing Github 1st Edition Peter Bell Brent Beer
A Git MVP Workflow
Best 7 Easy Ways To Buy GitHub Accounts in Proven Project.pdf
Best 7 Easy Ways To Buy GitHub Accounts in Proven Project.pdf
Contributing to github is for everyone
August OpenNTF Webinar - Git and GitHub Explained
What Is GitHub.pdf in united state of amarica
Introduction to Git and Github
Buy GitHub Account- 100% Secure Guarantee
Buy GitHub Account with 5% discount now In 2025
Ad

More from dreamwidth (16)

PPTX
From the Inside Out: How Self-Talk Affects Your Community
PPTX
Chenoweth os bridge 2015 pp
PDF
When your code is nearly old enough to vote
PPTX
Hacking In-Group Bias for Fun and Profit
PPT
Slytherin 101: How to Win Friends and Influence People
PPTX
Keeping your culture afloat through a tidal wave
PDF
LCA2014 - Introduction to Go
PDF
User Created Content: Maintain accessibility in content you don't control
PDF
Kicking impostor syndrome in the head
PPT
Care and Feeding of Volunteers
PPT
Sowing the Seeds of Diversity
PDF
Be Kind To Your Wrists (you’ll miss them when they’re gone)
PDF
Web Accessibility for the 21st Century
PPT
Servers and Processes: Behavior and Analysis
PDF
Overcoming Impostor Syndrome
PPT
Build Your Own Contributors, One Part At A Time
From the Inside Out: How Self-Talk Affects Your Community
Chenoweth os bridge 2015 pp
When your code is nearly old enough to vote
Hacking In-Group Bias for Fun and Profit
Slytherin 101: How to Win Friends and Influence People
Keeping your culture afloat through a tidal wave
LCA2014 - Introduction to Go
User Created Content: Maintain accessibility in content you don't control
Kicking impostor syndrome in the head
Care and Feeding of Volunteers
Sowing the Seeds of Diversity
Be Kind To Your Wrists (you’ll miss them when they’re gone)
Web Accessibility for the 21st Century
Servers and Processes: Behavior and Analysis
Overcoming Impostor Syndrome
Build Your Own Contributors, One Part At A Time

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Cloud computing and distributed systems.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
Cloud computing and distributed systems.
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation

How We Learned To Stop Worrying And Love (or at least live with) GitHub

  • 1. How We Learned To Stop Worrying And Love (Or At Least Live With) GitHub Open Source Bridge 2015 Jen Griffin (@kareila) Athena Yao (@afuna) Dreamwidth Studios (dreamwidth.org)
  • 2. How We Learned To Stop Worrying And Love (Or At Least Live With) GitHub These slides may be downloaded from http://slideshare.net/dreamwidth Our code may be downloaded from https://github.com/afuna/ghi-assist
  • 3. What Is GitHub? GitHub is the most widely used platform for managing open source projects. It provides: • source code management • issue management (aka bug tracking) • collaboration tools Anyone can easily sign up for a free account, modify a copy of an open source project, and request for their changes to be accepted.
  • 6. Why Use GitHub? Strengths Weaknesses • popularity / ubiquity • ease of use • powerful features • limited/difficult customization • Git (SCM) is hard • all-or-nothing permissions It is possible to use GitHub as a basic code repository and use other products for the rest of your project’s workflow.
  • 7. Case History: Dreamwidth • 2008: self-hosted Mercurial + Bugzilla • 2012: GitHub + Bugzilla • 2014: GitHub only Our code’s migration was planned and orderly. Switching issue trackers was not.
  • 9. Why Did We Wait? • More Flexible, Powerful Metadata • Easier Drop-In Contributions • Better Permissions & Privacy Bottom line: Bugzilla is a more fully featured bug tracker than GitHub Issues.
  • 10. Considering Our Options • Start again with Bugzilla - rejected because we didn’t want to continue self-hosting • Use a different hosted bug tracker - rejected because we couldn’t find anything that fit our needs (YMMV) • Set up an issues-only GitHub repo with admin access for all - rejected as messy and confusing • What we finally decided - use GitHub Issues normally and do our best to work around rough spots
  • 12. GitHub Permissions (For Teams) • Anyone: can browse, create and comment on issues, fork the code, and submit pull requests. • Members: can also have issues assigned to them by admins and be referenced by name in comments. • Admins: can commit code changes and make changes to issues, including labels and assignments.
  • 13. Permissions: What We Wanted • Anyone: can browse, create and comment on issues, fork the code, and submit pull requests. • Members: can also assign issues to themselves, be referenced by name in comments, and categorize existing issues with labels. • Admins: can commit code changes and make changes to issues, including labels and assignments.
  • 14. Enter The API GitHub provides a programming interface for interacting with issues and pull requests: https://developer.github.com/ Notifications are sent when items are opened, closed, or commented on. Since anyone can comment, anyone can trigger API actions via specially formatted comments!
  • 15. How It Works • The service is similar to a chatbot. It listens for GitHub API events and responds as desired. • In order to execute the requested actions, it will need to be linked to a GitHub account that has access to commit the changes. • You will probably want to give it a name that makes clear it is an automated process.
  • 16. Currently Defined Actions Assign Related Issue: If a pull request claims to fix an issue, assign the issue to the author Claim Issue: Assign[*] issue to anyone who leaves a comment saying “claim”, “claiming” or “claimed” Add Labels: Labels can be added via comments by prefixing the name of the label (##labelname)
  • 20. Anatomy of a Webhook 1. Verify request came from GitHub 2. Determine event type 3. Do some action based on the payload contents
  • 21. def signature_valid(self, data=None, signed_data=None, digest=sha1): mac = hmac.new(self.secret, msg=data, digestmod=digest) try: return hmac.compare_digest( mac.hexdigest(), signed_data) except AttributeError: # < Python 2.7.7 return mac.hexdigest() == signed_data
  • 22. signature_header = request.headers.get( 'X-Hub-Signature') digest, signature = signature_header.split('=’) if digest != "sha1": abort(501, "'%s' not supported." % digest) if not webhook.signature_valid( data=request.body.read(), signed_data=signature): abort(403, "Signature does not match expected value.")
  • 23. Anatomy of a Webhook 1. Verify request came from GitHub 2. Determine event type 3. Do some action based on the payload contents
  • 25. Anatomy of a Webhook 1. Verify request came from GitHub 2. Determine event type 3. Do some action based on the payload contents
  • 26. CLAIM_PATTERN = re.compile(r'bclaim(?:ed|ing)?b', re.I) class ClaimHook(Hook): def should_perform_action(self, payload, api): if payload["issue"]["assignee"] is None and CLAIM_PATTERN.search( payload["comment"]["body"]): return True else: return False
  • 27. headers = { 'User-Agent': "GHI Assist Bot", 'Authorization': "token %s" % self.token, } response = requests.request("PATCH", "https://api.github.com…", headers=headers, data=json.dumps({"assignee": assignee}) )
  • 28. Resources Code for our GitHub assistant: https://github.com/afuna/ghi-assist GitHub’s API reference: https://developer.github.com/ Download link for our slides: http://slideshare.net/dreamwidth
  • 29. Any Questions? You can find us on Dreamwidth, GitHub, and Twitter: Jen Griffin (kareila@dreamwidth.org) Athena Yao (afuna@dreamwidth.org) Thank you for coming!

Editor's Notes

  • #2: Point out usernames are valid for Dreamwidth, GitHub, and Twitter
  • #4: Ask for show of hands who hasn’t used GitHub – probably won’t be many
  • #5: Point out buttons for watch/star/fork, especially fork
  • #6: Explain difference between left and right columns
  • #8: http://wiki.dreamwidth.net/wiki/index.php/Dreamwidth_Timeline
  • #11: https://dw-staff.dreamwidth.org/86930.html
  • #12: Bad Joke Eel
  • #13: I am lumping “owners” and “committers” together here as “admins” for simplicity
  • #20: Bad Joke Eel