CONTRIBUTING TO STRONGLOOP
LOOPBACK
Supasate Choochaisri
@ Code Chill Chill15 July 2016
(and other open source projects)
ABOUT ME
Supasate Choochaisri (Ping)
Larngear Technology & Streaming Co., Ltd.Thai Programmer Association
IBM Inventor: LoopBack Developer Level II
[email protected]/supasate@kaizerwing
JUST STARTED CONTRIBUTING
WHAT IS STRONGLOOP LOOPBACK?
•github.com/strongloop/loopback
•A popular open source Node.js
framework
• For composing scalable APIs
Model Auto Creation
http://localhost:3000/explorer
MORE INFO
• loopback.io
• strongloop.com/node-js/loopback-framework
•www-03.ibm.com/software/products/en/api-connect
HOW DID I START CONTRIBUTING TO
LOOPBACK?
Myth
Only good developers
contribute to open source
Fact
Contribute to open source
to become a good or better
developer
START LIKE A BEGINNER
No one responds to my PR
Forgot to follow up
Tried installing and failed
Yeah!!! My first merged PR
Run test and failed at eslintand landed my second PR
WANT TO TRY ON LARGER PROJECT
Filter by beginner-friendly label
Filter by beginner-friendly label
Fix it and submit PRs (Pull Request)
CONTRIBUTIONPROCESS
(can be applied to several projects)
DOCS.DOCKER.COM/OPENSOURCE/WORKFLOW/MAKE-A-CONTRIBUTION/
LoopBack similar process
https://github.com/strongloop/loopback/wiki/Contributing-code#submitting-a-pull-request
https://github.com/strongloop/loopback/wiki/Contributing-code#submitting-a-pull-request
LoopBack similar process
https://github.com/strongloop/loopback/wiki/Contributing-code#signing-patches
SIGNING PATCHES
https://github.com/strongloop/loopback/wiki/Contributing-code#contributor-license-agreement
CONTRIBUTOR LICENSE AGREEMENT
STEP BY STEPIN REAL ACTION
A FEW DAYS AGOI SAW AN ISSUE
THAT MIGHT BE ABLE TO BE SOLVED
BEFORE THIS TALK
2) CLONE FORKED REPO
2) CLONE FORKED REPO
3) ADD UPSTREAM REPO
3) ADD UPSTREAM REPO
4) PREPARE ENVIRONMENT
5) FEEL THE RUNNING PROJECT(COMPILE / RUN / TEST)
5) FEEL THE RUNNING PROJECT(COMPILE / RUN / TEST)
6) CREATE NEW BRANCH
7) THE HARDEST PART:FIND, UNDERSTAND, FIX
• Ask project owner where to start• Search with keyword• Method call tracing• Debugging tool• etc.
7.1) MODIFY CODE(I found in code that the issue was actually solved so I just added a test to cover)
7.2) RUN TEST (BEFORE COMMIT)
FIX ERROR UNTIL THERE IS NO ERROR
8) ADD & COMMIT & SIGN-OFF
8) ADD & COMMIT & SIGN-OFF
9) REBASE WITH UPSTREAM(UPSTREAM MIGHT CONTAIN NEW CHANGES WHILE WE WERE FIXING)
10) PUSH TO YOUR FORKED REPOlocal branch remote branch
11) OPEN A PULL REQUEST (PR)
Short title
Description
12) CHECK STATUS
Bot
12) CHECK STATUS
one time per repo
13) AGREE CONTRIBUTOR LICENSE AGREEMENT(ONE TIME PER REPO)
13) AGREE CONTRIBUTOR LICENSE AGREEMENT(ONE TIME PER REPO)
14) CHECK CONTINUOUS INTEGRATION STATUS
15) NOTIFY A VERIFIER TO TAKE A LOOK
15) NOTIFY A VERIFIER TO TAKE A LOOK
16) READ COMMENTS
16) READ COMMENTS
17) FIX
Fix it, then, npm run test
18) SQUASH INTO ONE COMMIT
Interactive mode
2 commits from HEAD
18) SQUASH INTO ONE COMMIT
18) SQUASH INTO ONE COMMIT
18.1) CHOOSE COMMIT MESSAGE
18.1) CHOOSE COMMIT MESSAGE
19) FORCE PUSH(WARNING: HISTORY WILL BE RE-WRITTEN)
20) CHECK STATUS(THIS CASE REBASE NEEDED)
21) REBASE AND PUSH AGAIN
(OPTIONAL) LOOK CI STATUS
DOCS.DOCKER.COM/OPENSOURCE/WORKFLOW/MAKE-A-CONTRIBUTION/
ENJOY CONTRIBUTING!!!
Supasate Choochaisri (Ping)github.com/[email protected]@gmail.com