Slide 1

Slide 1 text

Your  first  PR:  contribu0ng  to  open-­‐source  projects   Gareth  Ellis  (@garethellis)   Developer,  Language  Services,  ICON  plc   For  NomadPHP,  May  2016  

Slide 2

Slide 2 text

Who  am  I?   •  Developer,  Language  Services  group,   ICON  plc   •  Professional  developer  since  2013   •  Co-­‐founder/organizer  PHPOxford   •  Occasional  contributor  to  open-­‐ source  projects  

Slide 3

Slide 3 text

Why  should  I  contribute?  

Slide 4

Slide 4 text

Give  something  back   It’s  the  circle  of  life  open-­‐source  soZware  

Slide 5

Slide 5 text

Self-­‐improvement   Exposure  yourself  to  new  codebases,  techniques  and  pa]erns.  

Slide 6

Slide 6 text

Fun!   “It’s  good  for  the  soul”   Nils  Luxton  (@nilsluxton)  

Slide 7

Slide 7 text

What  can  I  contribute?  

Slide 8

Slide 8 text

Iden0fy  a  project   What  do  you  use  regularly  that  could  benefit  from  some   improvements?  

Slide 9

Slide 9 text

Types  of  contribu0on   Submit  an  issue  on  Github     Answer  a  ques0on  on  StackOverflow     Documenta0on     Blog  post     Code!  

Slide 10

Slide 10 text

Contribu0ng  to  source  code   Changes  can  be  big  or  small  

Slide 11

Slide 11 text

Contribu0ng  to  source  code   The  project  may  have  already  iden0fied  a  gap  –  can  you  help?  

Slide 12

Slide 12 text

How  do  I  contribute?  

Slide 13

Slide 13 text

Before  you  begin!   Consider  discussing  what  you  want  to  change  with  the  project   maintainers.  

Slide 14

Slide 14 text

CONTRIBUTING.md   Read  the  contribu0ng  guidelines.  

Slide 15

Slide 15 text

The  process!   1.  Fork   2.  Clone   3.  Branch   4.  Change   5.  Commit   6.  Push   7.  Submit  Pull  Request   8.  Review  

Slide 16

Slide 16 text

Fork  

Slide 17

Slide 17 text

Clone   $  git  clone  [email protected]:garethellis36/cakephp.git   $  cd  cakephp   $  composer  install  

Slide 18

Slide 18 text

Clone  (2)   $  git  remote  add  upstream  [email protected]:cakephp/cakephp.git  

Slide 19

Slide 19 text

Branch   $  git  checkout  –b  my-­‐awesome-­‐new-­‐feature  

Slide 20

Slide 20 text

Make  your  changes   Follow  contribu0on  guidelines   Write  tests  as  necessary  

Slide 21

Slide 21 text

Commit  and  push   $  git  add  src/Folder/AnotherFolder/ChangedFile.php   $  git  commit  –m  “Here’s  a  descrip0on  of  this  awesome  new  feature”   $  git  push  –u  origin  my-­‐awesome-­‐new-­‐feature  

Slide 22

Slide 22 text

Submit  the  Pull  Request!   Screenshot  used  with  permission  of  Rob  Allen  

Slide 23

Slide 23 text

Submit  the  Pull  Request!  (2)   Screenshot  used  with  permission  of  Rob  Allen  

Slide 24

Slide 24 text

Review   Discuss  your  PR  with  the  project  maintainers   Make  changes  if  necessary   To  add  changes  to  your  PR,  simply  change,  commit  &  push  

Slide 25

Slide 25 text

Further  reading:     Find  projects  to  contribute  to:     h]ps://yourfirstpr.github.io/     h]p://issuehub.io/   h]p://up-­‐for-­‐grabs.net/     Joind.in:  h]ps://joind.in/about       h]ps://akrabat.com/the-­‐beginners-­‐guide-­‐to-­‐contribu0ng-­‐to-­‐a-­‐github-­‐project/   (Rob  Allen)     h]p://www.lornajane.net/posts/2015/code-­‐reviews-­‐before-­‐you-­‐even-­‐run-­‐the-­‐code   (Lorna  Mitchell)    

Slide 26

Slide 26 text

Thanks  for  listening.     h]ps://joind.in/talk/c5551       [email protected]   @garethellis   h]ps://blog.garr.co.uk