From 2c39ca924294bbdbe7b70439f6515f85cc7dc876 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 24 Oct 2018 16:07:23 +0200 Subject: [PATCH 1/5] Added first draft for the presentation --- Presentation.org | 196 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 Presentation.org diff --git a/Presentation.org b/Presentation.org new file mode 100644 index 0000000..e071568 --- /dev/null +++ b/Presentation.org @@ -0,0 +1,196 @@ +#+Title: Git Project Manager / Commission Open Source +#+Author: Yann Esposito +#+Date: <2018-10-25 Thu> + +** =git= is a *Distributed* Concurrent Versions System + +** GitHub is a *Centralized* =git= host +* Can we do without Github™? +*** Betteridge's law + +Betteridge's law of headlines is an adage that states: + +#+BEGIN_QUOTE +Any headline that ends in a question mark +can be answered by the word no. +#+END_QUOTE + +. . . + +Here the answer is *YES*! + +- Linux (only mail) +- GHC used a self hosted instance of phabricator + trac +- many others I don't know + +*** All right, we can, but /should we/? + +#+BEGIN_SRC +__ _______ ____ _ +\ \ / / ____/ ___|| | + \ V /| _| \___ \| | + | | | |___ ___) |_| + |_| |_____|____/(_) +#+END_SRC + +** GitHub™ +*** GitHub™: Social Network + + - user management & trust + - discoverability + +*** GitHub™: its free! + +#+BEGIN_QUOTE +If you're not paying for it, +you're the product being sold. +#+END_QUOTE + +$$: Pay for private repositories + +*** GitHub™: Features!!! + +From their website (in that order): + + - /Code Review/: comment diffs, approve, refuse, etc... + - /Project Management/: issues, milestones, dashboard, etc... + - /Integrations/: travis, slack, etc... + - /Team Management/: access rights, community guidelines, etc... + - /Social Coding/: follow, explore, share, etc... + - /Documentation/: github pages, wiki, ...à + - /Code Hosting/: all your code in one place, tree view, blame view, etc... + +*** GitHub™: Metas + +Most GitHub™ features put data in their own internal closed representation: + +- Issues +- Comments +- Pages +- Pull Request & review +- Wiki + +Note there are tools to export them. +Ex: migrate to Gitlab + +*** GitHub™ is great today but can suck tomorrow + +- /bloatware/ + remember digg, readitlater? think about the latest reddit design? +- /payware/ + You rely on our feature, but now, we want you to move or to pay. Fair ;) +- /crapware/ + Nothing works as expected unless you pay: Twitter streaming API? +- /dieware/ + Remember Friendfeed? Google Reader™? +- etc... + +*** GitHub™ force all your team member to use GitHub™ + +Were you already forced to: + +- use PowerPoint? Excel? Word? +- code in PHP? in Java? +- work on windows? Harder need to ssh to UNIX machines? +- use notepad instead of vim? +- use Eclipse instead of emacs? +- etc... + +Why? Those tools don't rely on /OPEN STANDARD/ + +*REAL STORY @WORK*: github dashboard is slow & terrible for an organizer. + +*** Why you shouldn't rely too much on GitHub™? + +- Github™ is great to get you started: + - nothing to install + - only high level interface + - everythin well explained + - github is really a great product +- The hidden price to pay: + - use closed source services + - give freely many private infos + - you must TRUST github for privacy, private account + +*** We should do our best not to rely on any central product + +- self host? Gitlab-ee, Gitlab-ce, => HUGE WARN TO UPDATE, fix a security bug + but also add a bunch of new features (anti-features?) +- meta data hosted in DB +- if another use clone your repo, it doesn't get all metas of your project: + +*** =git clone= misses + +- [X] code + +- [ ] *issues* +- [ ] *reviews* +- [ ] *comments* +- [ ] *wiki/doc* +- [ ] *hooks* +- [ ] *web pages* + +** Decentralized Web + +*** Decentralized Authentication: IndieAuth + +- one of your online identities = one domaine name +- serve a page with all your online identity providers and username + - google + - twitter + - etc... + - but also your GPG keys (see keybase) + +Mainly you OWN & CONTROLE your identity and the informations about it. + +*** Decentralized Comments: Webmention + +- you host your comment +- a 3rd party website can decide to show it in its comment section + +*** Dentralized Web + +- Your content is yours (prevent site death, change it, delete it...) +- Better connection: + - messages can go to all your services + - use open standards +- You are in control + - post anything, any format, no monitoring, share links. + +Follow: + +- https://indiewebify.me +- https://indieweb.org + +* Git Project Manager +*** Problems + +- can't clone everything +- big dependence on private tooling (that could change or being interrupted) +- force same tooling choices accross your team members + +*** Solutions + +- put metas in git branches +- use text files for everything +- rely more on open source tools, formats and conventions + +*** Git Project Manager =gpm= + +=gpm= is a command line tool that is mainly a set of simples git commands to remember. + +- most command could have been git aliases +- use some standards to help +- you can do a =gpm= for yourself and your team in few hours +- you don't enfoce =gpm= to your other member +- =gpm= just enforce a set of conventions + automate few common tasks + +*** =gpm= conventions + +- =git= of course +- =org-mode= +- git project management metas goes in the branch =gpm= +- issues goes in =issues.org= file +- reviews goes in =reviews/= with name =-.org= +- docs goes in =wiki.org= +- serve goes in your XDG data dir From e5c36f86d4ffbf67ed8912a18de8314bdf936c2a Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 24 Oct 2018 19:16:59 +0200 Subject: [PATCH 2/5] Update presentation --- Presentation.org | 120 ++++++++++++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 49 deletions(-) diff --git a/Presentation.org b/Presentation.org index e071568..a647a6d 100644 --- a/Presentation.org +++ b/Presentation.org @@ -3,7 +3,6 @@ #+Date: <2018-10-25 Thu> ** =git= is a *Distributed* Concurrent Versions System - ** GitHub is a *Centralized* =git= host * Can we do without Github™? *** Betteridge's law @@ -60,7 +59,7 @@ From their website (in that order): - /Documentation/: github pages, wiki, ...à - /Code Hosting/: all your code in one place, tree view, blame view, etc... -*** GitHub™: Metas +*** GitHub™: Metas Most GitHub™ features put data in their own internal closed representation: @@ -76,7 +75,9 @@ Ex: migrate to Gitlab *** GitHub™ is great today but can suck tomorrow - /bloatware/ - remember digg, readitlater? think about the latest reddit design? + remember digg, readitlater? +- /downgradeware/ + Swagger-UI v3 (v2 is neat), reddit new redesign (looks better, but slow) - /payware/ You rely on our feature, but now, we want you to move or to pay. Fair ;) - /crapware/ @@ -92,34 +93,35 @@ Were you already forced to: - use PowerPoint? Excel? Word? - code in PHP? in Java? - work on windows? Harder need to ssh to UNIX machines? -- use notepad instead of vim? -- use Eclipse instead of emacs? +- use Eclipse instead of vim/emacs? +- use a super complex GUI instead of a few command line tools? - etc... -Why? Those tools don't rely on /OPEN STANDARD/ -*REAL STORY @WORK*: github dashboard is slow & terrible for an organizer. +*REAL STORY @WORK*: github dashboard is slow & terrible for the manager. *** Why you shouldn't rely too much on GitHub™? - Github™ is great to get you started: - nothing to install - only high level interface - - everythin well explained + - everything explained with nice docs - github is really a great product -- The hidden price to pay: +- *The hidden price to pay*: - use closed source services - give freely many private infos - you must TRUST github for privacy, private account -*** We should do our best not to rely on any central product +*** Why not self hosted Gitlab then? -- self host? Gitlab-ee, Gitlab-ce, => HUGE WARN TO UPDATE, fix a security bug - but also add a bunch of new features (anti-features?) -- meta data hosted in DB -- if another use clone your repo, it doesn't get all metas of your project: +Gitlab is a better alternative but: -*** =git clone= misses +- You still keep the metas of your project in the Gitlab server in some DB. +- You still force all the member of your team to use your Gitlab version, with + your Gitlab plugins, with your Gitlab settings, etc... +- Gitlab push a big warn so you are pushed to upgrade (new features & anti-features) + +*** =git clone= - [X] code @@ -130,8 +132,61 @@ Why? Those tools don't rely on /OPEN STANDARD/ - [ ] *hooks* - [ ] *web pages* -** Decentralized Web +* Git Project Manager +*** Problems +- can't clone everything +- big dependence on private tooling (that could change or being interrupted) +- force same tooling choices accross your team members + +*** Solution + +- put metas in git branches + *CLONE ALL THE THINGS!!!!* +. . . +- use text files for everything + *DO NOT FORCE ANY TOOL* +. . . +- only rely on conventions, better on standardized conventions + *HELP TO WRITE SPECIFIC OPEN SOURCE TOOLS* + +*** Git Project Manager =gpm= + +- command line tool +- integrate your project management metas in your git repo +- automate a few common tasks +- follow a few conventions + + +/Tool freedom/ + +- people on the team don't need to install or use =gpm= +- they just need to follow a minimal set of conventions +- want to use other conventions? Write yourself a =gpm= in a few hours. +- but really there are /very few/ conventions =gpm= follows + +*** =gpm= conventions + +- =git= as DCSV +- text files +- Project Management metas goes in the branch =gpm= + +*** Encouraged but not enforced =gpm= conventions + +- encourage to use =org-mode= format but you can change +- issues goes in =issues.org= file +- reviews goes in =reviews/= with name =-.org= +- docs goes in =wiki.org= +- serve goes in your XDG data dir (standard) + +*** git is already batteries included + +- =git= hooks +- =git instaweb= +- =git daemon= + +* Conclusion +** Decentralized Web *** Decentralized Authentication: IndieAuth - one of your online identities = one domaine name @@ -161,36 +216,3 @@ Follow: - https://indiewebify.me - https://indieweb.org - -* Git Project Manager -*** Problems - -- can't clone everything -- big dependence on private tooling (that could change or being interrupted) -- force same tooling choices accross your team members - -*** Solutions - -- put metas in git branches -- use text files for everything -- rely more on open source tools, formats and conventions - -*** Git Project Manager =gpm= - -=gpm= is a command line tool that is mainly a set of simples git commands to remember. - -- most command could have been git aliases -- use some standards to help -- you can do a =gpm= for yourself and your team in few hours -- you don't enfoce =gpm= to your other member -- =gpm= just enforce a set of conventions + automate few common tasks - -*** =gpm= conventions - -- =git= of course -- =org-mode= -- git project management metas goes in the branch =gpm= -- issues goes in =issues.org= file -- reviews goes in =reviews/= with name =-.org= -- docs goes in =wiki.org= -- serve goes in your XDG data dir From 4268108f4cbd854b4c3bca5baf9fcf2434ef8d74 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 24 Oct 2018 20:28:19 +0200 Subject: [PATCH 3/5] :construction: WIP :construction: --- Presentation.org | 42 ++++++++++++++++++++++++++++++++++++++++-- README.org | 2 +- playground/gpm-test.sh | 21 ++++++++++++++++++--- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/Presentation.org b/Presentation.org index a647a6d..8210b57 100644 --- a/Presentation.org +++ b/Presentation.org @@ -179,14 +179,52 @@ Gitlab is a better alternative but: - docs goes in =wiki.org= - serve goes in your XDG data dir (standard) -*** git is already batteries included +*** git is awesome! + +battery included: - =git= hooks - =git instaweb= - =git daemon= +*** org-mode is awesome + +- TODO list oriented document convention +- Extremely versatile: + - issues, bug tracking, comments + - handling with minimal friction code reviews =org-annotate-file= + - workflows: + - basic trello (TODO, IN-PROGRESS, DONE) + - scrum (EPIC / USER-STORY / etc...) + - kanban: + - EPIC with different statuses (prep, specified,etc..), comments + - user stories with evaluation, different status, comments + - QA status + - Ops status + +* DEMO + * Conclusion -** Decentralized Web +*** Proof of concept + +- =gpm= is a proof of concept but so simple its already usable +- git clone should provide most of your projects data +- don't enforce tooling on your team, use text files +- I encourage your to use org-mode its awesome! /REALLY!/ + - vimer => spacemacs or doom-emacs + - IDE => switch to spacemacs eat the bullet! + - you still can edit org-mode with notepad + +*** Going further: Decentralized Web + +- the Internet was thought to be decentralized +- centralization of services made lot of things easy, it was fair at first +- but made us dependant and the balance is no more fair +- it is time to re-decentralize the Internet and take back control +- we shouldn't be dependant of private services +- we should pay private service, but they should adapt to us, not the other way + around + *** Decentralized Authentication: IndieAuth - one of your online identities = one domaine name diff --git a/README.org b/README.org index 71f1ee9..2f0137c 100644 --- a/README.org +++ b/README.org @@ -259,7 +259,7 @@ I was surprised to discover that with org-mode and plain text file you can go a very long way toward project management organisation: - issues, bug tracking, comments -- handling with minimal firction code reviews +- handling with minimal friction code reviews - ability to integrate with any organization workflow you would like: - basic trello - scrum diff --git a/playground/gpm-test.sh b/playground/gpm-test.sh index 848a93d..d709b78 100755 --- a/playground/gpm-test.sh +++ b/playground/gpm-test.sh @@ -21,7 +21,7 @@ subtitle() { prjname="testproj" playgrounddir="/tmp/gpm-playground" testproj="$playgrounddir/$prjname" -testproj2="$playgrounddir/testproj2" +testproj2="$playgrounddir/cloned-$prjname" # display all commands set -x @@ -52,6 +52,7 @@ title "ISSUES" subtitle "gpm new-issue" gpm new-issue -t "issue-1" -p "A" + # ------------------------------------------------------------------------------ title "HOOKS" @@ -72,15 +73,29 @@ subtitle "gpm serve start" gpm serve update gpm serve start popd -mkdir $testproj2 -pushd $testproj2 +# ------------------------------------------------------------------------------ +title "CLONE" + +mkdir -p ${testproj2:h} +pushd ${testproj2:h} subtitle "git clone" git clone git://localhost:9418/${prjname}.git $testproj2 subtitle "gpm init (into the cloned repo)" gpm init +subtitle "review" +echo "Some Edit" >> README + +gpm review start +gpm review request-change -t add more infos please + +git remote add dev $testproj + +# ------------------------------------------------------------------------------ +title "STOP SERVE" + subtitle "gpm serve stop" gpm serve stop popd From 1b276188c38d3b4705d3abd8ce9140183facf569 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 24 Oct 2018 21:54:05 +0200 Subject: [PATCH 4/5] added review --- playground/gpm-test.sh | 67 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/playground/gpm-test.sh b/playground/gpm-test.sh index d709b78..1a6b4bd 100755 --- a/playground/gpm-test.sh +++ b/playground/gpm-test.sh @@ -21,7 +21,7 @@ subtitle() { prjname="testproj" playgrounddir="/tmp/gpm-playground" testproj="$playgrounddir/$prjname" -testproj2="$playgrounddir/cloned-$prjname" +clonedproj="$playgrounddir/cloned-$prjname" # display all commands set -x @@ -31,7 +31,7 @@ title "INIT" subtitle "Cleaning Up" [[ -d $testproj ]] && rm -rf $testproj -[[ -d $testproj2 ]] && rm -rf $testproj2 +[[ -d $clonedproj ]] && rm -rf $clonedproj [[ -d ~/.local/share/gpm ]] && rm -rf ~/.local/share/gpm gpm serve stop @@ -50,8 +50,7 @@ gpm init title "ISSUES" subtitle "gpm new-issue" -gpm new-issue -t "issue-1" -p "A" - +gpm new-issue -t "better README" -p "A" -b better-readme -t doc # ------------------------------------------------------------------------------ title "HOOKS" @@ -77,21 +76,65 @@ popd # ------------------------------------------------------------------------------ title "CLONE" -mkdir -p ${testproj2:h} -pushd ${testproj2:h} +mkdir -p ${clonedproj:h} +pushd ${clonedproj:h} subtitle "git clone" -git clone git://localhost:9418/${prjname}.git $testproj2 +git clone git://localhost:9418/${prjname}.git $clonedproj +# - - - - - - - - - - - - - - - - - - - - - - - - +pushd $clonedproj # Cloned project subtitle "gpm init (into the cloned repo)" gpm init -subtitle "review" +subtitle "Pull request" +git checkout -b better-readme echo "Some Edit" >> README +git add README +git commit -m "made a better README" -gpm review start -gpm review request-change -t add more infos please +popd +# - - - - - - - - - - - - - - - - - - - - - - - - -git remote add dev $testproj +subtitle "Review" + +pushd $testproj +git remote add dev $clonedproj + +git fetch dev +git checkout better-readme + +# look into README +# better with org-anotate-file `SPC o a` +# gpm review start +# gpm review end +gpm review request-change -t "add more infos please" + +popd + +# - - - - - - - - - - - - - - - - - - - - - - - - +pushd $clonedproj +gpm review retrieve +echo "More infos" >> README +git add README +git commit -m "added more infos" +popd +# - - - - - - - - - - - - - - - - - - - - - - - - + +pushd $testproj +git checkout better-readme +git pull +git review accept -t "LGTM" +git co master +git merge better-readme +gpm serve update +popd + +# - - - - - - - - - - - - - - - - - - - - - - - - +pushd $clonedproj +git co master +git pull +popd +# - - - - - - - - - - - - - - - - - - - - - - - - # ------------------------------------------------------------------------------ title "STOP SERVE" @@ -103,4 +146,4 @@ popd set +x echo "------------------------------------" echo "$testproj" -echo "$testproj2" +echo "$clonedproj" From 92ffaaf8338a6b3cc676bef9cae0fa5a183ac2aa Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 24 Oct 2018 23:30:06 +0200 Subject: [PATCH 5/5] Updated presentation --- Presentation.org | 176 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/Presentation.org b/Presentation.org index 8210b57..0c8402c 100644 --- a/Presentation.org +++ b/Presentation.org @@ -204,6 +204,182 @@ battery included: * DEMO +*** Create a git project + +#+BEGIN_SRC bash +mkdir -p /tmp/gpm-playground/testprj +cd /tmp/gpm-playground/testprj +echo "Hello GPM" > README +git init . +git add README +git commit -m "Initial commit" +#+END_SRC + +#+RESULTS: +Initialized empty Git repository in /private/tmp/gpm-playground/testprj/.git/ +[master (root-commit) 617f661] Initial commit +1 file changed, 1 insertion(+) +create mode 100644 README + +*** =gpm init= (1) + +#+BEGIN_SRC bash +gpm init +#+END_SRC + +#+BEGIN_SRC +GPM -- Git Project Manager +========================== +Create a new branch gpm (be sure the branch gpm doesn't already exists) + git checkout --orphan gpm +Switched to a new branch 'gpm' +cleanup the branch + git rm --cached -r . + git clean -fd +#+END_SRC + +*** =gpm init= (2) + +#+BEGIN_SRC +* issue.org + git add issues.org + git add templates +* wiki.org + git add wiki.org +* reviews.org + create some example review for inspiration + reviews/write-contributing-yogsototh.org + git add reviews + create some review templates + templates/new-review.org + git add templates +#+END_SRC + +*** =gpm init= (3) + +#+BEGIN_SRC +* hooks/ + Copyings default hooks into the hooks directory + git add hooks +* server init +create dir: /Users/yaesposi/.local/share/gpm/public + git init . + git rev-parse --show-toplevel + git rev-parse --show-toplevel + git clone --mirror /tmp/gpm-playground/testprj + ~/.local/share/gpm/public/testprj.git +Cloning into bare repository '.../testprj.git'... +done. + git update-server-info + git commit -m 'gpm initialized' + git checkout master +Switched to branch 'master' +#+END_SRC +*** The =gpm= branch + +#+BEGIN_SRC +> git checktout gpm +> tree +. +├── hooks +│   ├── applypatch-msg.sample +│   ├── commit-msg.sample +│ └── ... +├── issues.org +├── reviews +│   └── write-contributing-yogsototh.org +├── templates +│   ├── new-issue.org +│   └── new-review.org +└── wiki.org + +3 directories, 16 files +#+END_SRC + +*** Hooks + +#+BEGIN_SRC bash +> gpm hooks +Usage: gpm hooks sync + Handle hooks for this git repository + +Available options: + -h,--help Show this help text + +Available commands: + sync Synchronize hooks from gpm branch +#+END_SRC + +*** =issues.org= Basic + +#+BEGIN_SRC org +#+TODO: TODO(t) STARTED(s) WAITING(w) | DONE(d) CANCELLED(c) + +* Basic Usages +** TODO Do thing 3 +** STARTED Do thing 2 +** DONE Do thing 1 +#+END_SRC + +*** =issues.org= Complex workflow, review + +#+BEGIN_SRC org +#+PROPERTY: ASSIGNEE +#+PROPERTY: REVIEWER +#+TODO: REVIEW(i) | MERGED(m) +#+TODO: ACCEPTED(a) CHANGE_REQUESTED(c) QUESTION(q) FEEDBACK(f) | REFUSED(r) + +** REVIEW Basic review process + :PROPERTIES: + :BRANCH: explain-review-process + :ASSIGNEE: yogsototh + :END: + +*** ACCEPTED Review finished + :PROPERTIES: + :REVIEWER: shubby + :END: +#+END_SRC + +*** =issues.org= Full Professional Usage + +#+BEGIN_SRC org +#+TAGS: epic(e) user_story(u) task(t) qa(q) ops(o) + +* Some Title :epic: +** Some User Story :story: +*** Dev Task :task:dev: +*** Document Task :task:doc: +*** QA Task :task:qa: +*** Ops Task :task:ops: +#+END_SRC +*** =gpm new-issue= + +#+BEGIN_SRC bash +> gpm new-issue -i +#+END_SRC + +*** =gpm serve= + +- web interface: =git instaweb= (port 1234) +- git server: =git daemon= (port 9418) + +#+BEGIN_SRC +Usage: gpm serve (start | stop | update | path) + Serve the git to the web + +Available options: + -h,--help Show this help text + +Available commands: + start Start to serve all gpm tracked repositories + stop Stop to serve all gpm tracked repositories + update Update the served git repository + path Show the path of the bare repository +#+END_SRC + +*** =gpm review= + * Conclusion *** Proof of concept