18
\$\begingroup\$

I am currently writing some open source that's available in GitHub. Of course I am also getting the code reviewed here.

One of the things with GitHub is the documentation allows me to put little tags in the documentation that get evaluated (see README.md)

An example is the travis build (a tool for building and running unit tests automatically).

Example:

[![Build Status](https://travis-ci.org/Loki-Astari/ThorsSQL.svg?branch=master)](https://travis-ci.org/Loki-Astari/ThorsSQL)

Resulting in: Build Status

What would be nice if there is an equivalent API for Code Review. So I could add a snippet like the above to my GitHub documentation that shows a summary of being reviewed on Code Review:

Now I am not an artist (so please don't use this):

Loki's Example

Might even become a thing :-)

Added:

Can we also incorporate the Code Review icon when we officially get out of Beta.

Also be good if we could get the image of the accepted reviewer into item? enter image description here

\$\endgroup\$
12
  • 1
    \$\begingroup\$ Did you really create ThorsSQL.svg ... hehehe? \$\endgroup\$
    – rolfl Mod
    Commented Jun 27, 2015 at 20:31
  • \$\begingroup\$ That would be great. \$\endgroup\$
    – Mast Mod
    Commented Jun 27, 2015 at 20:46
  • \$\begingroup\$ I can dig it, but what does the 14 represent in your example? \$\endgroup\$
    – RubberDuck
    Commented Jun 27, 2015 at 20:48
  • 2
    \$\begingroup\$ @RubberDuck: I don't know. That would be something we need to discuss. What do you put on the right and left? \$\endgroup\$ Commented Jun 27, 2015 at 20:49
  • 1
    \$\begingroup\$ And how to handle certain repositories that has i++ questions? \$\endgroup\$ Commented Jun 27, 2015 at 23:38
  • 1
    \$\begingroup\$ Actually it is quite simple to create shields, there is a webservice for it. Example for number of reviewed snippets: img.shields.io/badge/reviewed-14-green.svg \$\endgroup\$
    – Pyfisch
    Commented Jun 28, 2015 at 17:21
  • \$\begingroup\$ @Pyfisch: That's very useful. But I was hoping to generate something that was dynamic based on the status of the git-hub review. \$\endgroup\$ Commented Jun 28, 2015 at 21:28
  • \$\begingroup\$ @LokiAstari: actually you can propose new services at their Github repo. There are already many requests to add new services. \$\endgroup\$
    – Pyfisch
    Commented Jun 29, 2015 at 14:42
  • \$\begingroup\$ @Pyfisch Thank you for that link, that will essentially make it possible to create our own dynamically generated shields. Now the question is primarily about what we want to show in the shields. \$\endgroup\$ Commented Jun 30, 2015 at 13:31
  • \$\begingroup\$ @Pyfisch: Thanks. Its truly amazing what is available on the web if you only know it exists. \$\endgroup\$ Commented Jun 30, 2015 at 14:49
  • \$\begingroup\$ @SimonAndréForsberg: There is already one for [stackexchange. github.com/badges/shields/pull/387] so our request is not unique (which is good). The bad part was that it was submitted May-9. Maybe it has not been integrated because they have not fixed the review comments. \$\endgroup\$ Commented Jun 30, 2015 at 14:53
  • \$\begingroup\$ @LokiAstari That request seems to be about user reputation, badges and tags though, not about specific questions. \$\endgroup\$ Commented Jun 30, 2015 at 23:28

1 Answer 1

12
\$\begingroup\$

Update

Implemented, see the Code Review question, for feature requests please open an issue on GitHub

It looks a little something like this:

Code Review http://www.zomis.net/codereview/shield/?qid=95459&mode=score Code Review http://www.zomis.net/codereview/shield/?qid=95459&mode=answers Code Review http://www.zomis.net/codereview/shield/?qid=95459&mode=views

To create a Code Review Shield easily, use the Code Review Shield Creator


I love this idea, and I love the fact that this is something we can implement ourselves, without requiring Stack Exchange. So I think someone of us should make it (is quite possible that someone will be me within a few days, unless someone else is faster).

About what to show, this is an example of what is retrieved from the Stack Exchange API when querying a question:

  "tags": [
    "java",
    "stackexchange",
    "spring"
  ],
  "owner": {
    "reputation": 35519,
    "user_id": 31562,
    "user_type": "registered",
    "accept_rate": 81,
    "profile_image": "https://i.sstatic.net/cV8hf.jpg?s=128&g=1",
    "display_name": "Simon André Forsberg",
    "link": "https://codereview.stackexchange.com/users/31562/simon-andr%c3%a9-forsberg"
  },
  "is_answered": true,
  "view_count": 1718,
  "answer_count": 2,
  "score": 34,
  "last_activity_date": 1428533615,
  "creation_date": 1422921671,
  "last_edit_date": 1428533615,
  "question_id": 79408,
  "link": "https://codereview.stackexchange.com/questions/79408/you-are-being-watched-comments-of-interest",
  "title": "You are being watched! - Comments of Interest"

Some of the most interesting things we can choose from there IMO are:

  • is_answered: Might be something to show for questions that are still unanswered? (Can be used to determine the color, red for unanswered and green for answered?)
  • answer_count: Probably not what you want to show off, especially not for questions that have few answers.
  • view_count: That might be something you want to share, at least if it has a reasonable amount of views.
  • score: Is definitely something that can be used!

Note that it is also possible to retrieve the answers to a question but I don't find that info very interesting for this feature.

\$\endgroup\$
4
  • \$\begingroup\$ To me. The actual score is not that important. But "view_count" is a measure that people have at least looked at it. If there is an accepted answer should be included in some way. Maybe "answer_count". \$\endgroup\$ Commented Jun 28, 2015 at 1:26
  • 1
    \$\begingroup\$ While there is not an accepted answer we could go with one metric. Like: Being-Reviewed: <Answer Count>. When an answer is accepted it goes to Reviewed: <View Count>. \$\endgroup\$ Commented Jun 28, 2015 at 1:38
  • \$\begingroup\$ @LokiAstari If I will be the one to implement it, I will probably make it an option :) \$\endgroup\$ Commented Jun 28, 2015 at 12:02
  • \$\begingroup\$ I am the last person you should ask about designing something visual (back end C++ remember). I am just throwing out ideas (see if any resonate with meta users). \$\endgroup\$ Commented Jun 28, 2015 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .