Community
Participate
Working Groups
There seems to be an evolving standard of having a "CONTRIBUTING" file in the root of a git repository (I've seen this sort of thing in repos on GitHub [1], for example). Naturally, the file describes how to contribute to the project, including a brief overview of the IP process (with links), how to use Gerrit, CLAs (when we get to that point), etc. We should endeavor to keep the content concise. Is there any means of creating this file automatically when a new Git repo is provisioned? Creating this in the wiki is probably the most accessible means. Thoughts? [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=391473#c8
Include discussion of supported mirrors (e.g. GitHub or Google Source), including whether or not the project can accept GitHub pull requests.
I think this is super important. Is there anything the CBI project can do to help? Do we need to scan each of our repos to see if a CONTRIBUTING file is present and if not, open individual bugs against them?
I wrote a little script that automatically generates content. https://wiki.eclipse.org/Architecture_Council/Contributor_Guide_Recommendation#Automagic_Generation If we could automatically generate pull requests (or Gerrit review requests), that'd be awesome.
I could perhaps leverage Genie to file a bug... Not sure about a code review. This one-liner will scan the repos and count the CONTRIBUTING files: for i in $(find /home/data/git -maxdepth 3 -name '*.git' -type d | sort | sed -e 's#/home/data/git##'); do echo -n $i: ; ./wget -q -O - http://git.eclipse.org/c/$i/tree/ | grep -oci "CONTRIBUTING"; done
(In reply to Denis Roy from comment #4) > I could perhaps leverage Genie to file a bug... Not sure about a code > review. > > This one-liner will scan the repos and count the CONTRIBUTING files: > > for i in $(find /home/data/git -maxdepth 3 -name '*.git' -type d | sort | > sed -e 's#/home/data/git##'); do echo -n $i: ; ./wget -q -O - > http://git.eclipse.org/c/$i/tree/ | grep -oci "CONTRIBUTING"; done They might have CONTRIBUTING.md files too so maybe have to account for both.
> They might have CONTRIBUTING.md files too so maybe have to account for both. Yup, regexp "CONTRIBUTING" will match that.
If I only scan Gerrit repos, I guess I could clone those who have nothing, add the automated file from PMI then commit+push the change request... for i in $(find /home/data/git/gerrit/ -maxdepth 3 -name '*.git' | sort | sed -e 's#/home/data/git/gerrit##' | egrep -v "^/www.eclipse.org"); do COUNT=$(./wget -q -O - http://git.eclipse.org/c/$i/tree/ | grep -ci "CONTRIBUTING"); if [ $COUNT -eq 0 ]; then echo "$i HAS NOTHING"; fi; done Do we have a mechanism to map a project's short name to its full name so I can call PMI? All I have is "e4" and "equinox"...
Adding a dependency on bug 434494 If I can get just a list of projects, I can grep through it and find the full project name and hence get the Gerrit project (Gerrit does provide a list of projects in plaintext, but I'd need to use SSH).
> If I can get just a list of projects egrep and sed to the rescue: wget -qO - https://projects.eclipse.org/list-of-projects | egrep "<a href=\"/projects/" | sed -e 's#.*<a href="/projects/##' | sed -e 's#">.*##'
https://git.eclipse.org/r/#/c/26543/ Before I do them all, how does that look?
(In reply to Denis Roy from comment #10) > https://git.eclipse.org/r/#/c/26543/ > > Before I do them all, how does that look? It looks about right. Are you addressing projects with multiple Git repositories?
I am crawling Gerrit repos which do not contain a file called CONTRIBUTING*
For documentation's sake, here is the one-liner I used: ~/wget -qO - https://projects.eclipse.org/list-of-projects | egrep "<a href=\"/projects/" | sed -e 's#.*<a href="/projects/##' | sed -e 's#">.*##' > projectlist; for i in $(find /home/data/git/gerrit/ -maxdepth 3 -name '*.git' | sort | sed -e 's#/home/data/git/gerrit##' | egrep -v "^/www.eclipse.org" | egrep -v "exclusion_list_here"); do COUNT=$(~/wget -q -O - http://git.eclipse.org/c/$i/tree/ | grep -ci "CONTRIBUTING"); if [ $COUNT -eq 0 ]; then PROJECT=$(echo $i | egrep -o "^/[a-zA-Z0-9_-]+" | sed -e 's#/##'); PROJECTFULL=$(egrep "$PROJECT" projectlist | head -n 1); echo "Project $PROJECT ($PROJECTFULL) in $i HAS NOTHING"; if [ -n "$PROJECTFULL" ]; then ~/wget -qO CONTRIBUTING http://www.eclipse.org/projects/tools/default_contributing_file.php?id=$PROJECTFULL; if [ -s CONTRIBUTING ]; then echo "We have a CONTRIBUTING file for $PROJECTFULL - cloning code"; git clone ssh://droy@git.eclipse.org:29418$i project; cd project; cp ../CONTRIBUTING .; git add CONTRIBUTING; git commit -s -m "Bug: 402384 Add CONTRIBUTING file" CONTRIBUTING; git push origin HEAD:refs/for/master; echo "Done.. Press any key"; read; cd ~/git; rm -rf project/; fi fi; fi; done I've submitted changes 26593 ~ 26663 using this. It was not successful on all repos, as some had additional restrictions that caused the change to fail (Hudson voted -1, change-id was required). I don't intend on performing something similar to the pure Git repos as I don't feel opening a bug and attaching a patch will yield reasonable results. From here I'll close this as FIXED.
.
New Gerrit change created: https://git.eclipse.org/r/92034
Gerrit change https://git.eclipse.org/r/92034 was merged to [2.1.2-service]. Commit: http://git.eclipse.org/c/lyo/org.eclipse.lyo.client.git/commit/?id=8fa106262c8a60b84b01deca6fc9147de21de0ec