Hi, On Tue, 15 Jan 2019 at 23:47, Matt Turner <matts...@gmail.com> wrote: > On Mon, Jan 14, 2019 at 4:36 AM Daniel Stone <dan...@fooishbar.org> wrote: > > On Fri, 11 Jan 2019 at 17:05, Jason Ekstrand <ja...@jlekstrand.net> wrote: > > > 5. There's no way with gitlab for Reviewed-by tags to get automatically > > > applied as part of the merging process. This makes merging a bit more > > > manual than it needs to be but is really no worse than it was before. > > > > I'm still on the side of not seeing the value in them. > > Reviewed-by tags are useful for measuring the quantity of patch review > people do (which is useful in a corporate environment...). It's often > a thankless task that's valued much lower than first order > contributions, so having a way to at least quantify patch reviews > shows that people are spending their time to help others contribute. > > The number of R-b tags is not a 100% accurate picture of the > situation, but it gives at least a good overview of who is doing the > tedious work of patch review. For instance, in 2018 the top reviewers > are > > 620 Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> > 530 Marek Olšák <marek.ol...@amd.com> > 505 Jason Ekstrand <jason.ekstr...@intel.com> > 452 Kenneth Graunke <kenn...@whitecape.org> > > If my name were in there, it would definitely be something I put on my > yearly review.
Obviously shell scripting will not do in the advanced enterprise environment, so we're into the realm of Python. Nevertheless, I've attached a script which will let you prove your individual worth to the company, as well as producing a leaderboard for team morale purposes: ~/tmp % ./kwg-gitlab-rb.py kwg participated in 10 merged MRs this year (61 total): MR 105: gallium: Add a PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE capability and query type MR 96: st/mesa: Optionally override RGB/RGBX dst alpha blend factors MR 95: st/nir: Lower TES gl_PatchVerticesIn to a constant if linked with a TCS. MR 92: nir: Allow a non-existent sampler deref in nir_lower_samplers_as_deref MR 62: i965: fix VF cache issue workaround MR 39: i965: Enable software support for ARB_gpu_shader_fp64/ARB_gpu_shader_int64 MR 26: Revert "nir/lower_indirect: Bail early if modes == 0" MR 12: Add preemption support to i965 on gen9+ MR 9: Misc optimizations MR 4: mesa/st: Expose compute shaders when NIR support is advertised. Top 10 MR participants: 29 jekstrand 16 anholt 14 bnieuwenhuizen 10 jljusten 10 kwg 10 idr 9 dbaker 9 eric 8 llandwerlin 6 cmarcelo Cheers, Daniel
#!/usr/bin/python3 from collections import Counter import datetime from itertools import chain import gitlab import os import sys MY_USERNAME="kwg" LEADERBOARD_LEN=10 # Look back over the past year end_of_year = datetime.datetime.now() start_of_year = end_of_year - datetime.timedelta(days=365) # ... or calendar years are available #start_of_year = datetime.datetime(year=2017, month=12, day=31) #end_of_year = datetime.datetime(year=2019, month=1, day=1) gl = gitlab.Gitlab("https://gitlab.freedesktop.org", os.environ["GITLAB_TOKEN"], api_version=4) project = gl.projects.get(id="mesa/mesa") merged_mrs = project.mergerequests.list(state="merged", updated_after=start_of_year, updated_before=end_of_year, all=True, as_list=False) my_mrs = list(filter(lambda mr: MY_USERNAME in [p["username"] for p in mr.participants()], merged_mrs)) print("{user} participated in {me} merged MRs this year ({all} total):".format(user=MY_USERNAME, me=len(my_mrs), all=len(list(merged_mrs)))) for mr in my_mrs: print(" MR {:4d}: {}".format(mr.iid, mr.title)) print() print("Top {} MR participants:".format(LEADERBOARD_LEN)) leaderboard = Counter(chain.from_iterable(map(lambda mr: [p["username"] for p in mr.participants()], merged_mrs))) for hero, count in leaderboard.most_common(LEADERBOARD_LEN): print(" {:3d} {}".format(count, hero))
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev