Skip to content
Snippets Groups Projects

WIP: Show commits by author

17 unresolved threads

What does this MR do?

Allows the projects commit history to be filtered by commit author when clicking on the authors name

Are there points in the code the reviewer needs to double check?

Currently this feature has not been implemented in Gitaly, as a result this MR only has code that would work for the old way of searching/filtering commits.

Why was this MR needed?

To resolve https://gitlab.com/gitlab-org/gitlab-ce/issues/12760

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #12760 (moved)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
    • Right now we support author=Full Name, but since multiple people can have the same name, I think it would be better to match by email (author=douwe@gitlab.com), or by GitLab username (author=DouweM). When searching by GitLab username, we should look up the user in question, and return all commits by user.all_emails.

    • In the link in the list of commits, we should link to author=username when we know the commit's user, and to author=email otherwise.

    • Please register or sign in to reply
  • assigned to @DouweM

  • @nadiavu thanks for taking this on! I agree with all of @DouweM's comments above, particularly https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14468#note_41283821, but the code here looks pretty good!

    Could you take a look at our comments above, please?

  • Thank you @smcgivern and @DouweM for your feedback. I will make all the necessary changes.

  • added 60 commits

    • b08eb5ce...cfccb278 - 57 commits from branch gitlab-org:master
    • d1b26ada - Delete empty line and fix typo
    • 5f3dff8d - Merge branch 'master' of https://gitlab.com/nadiavu/gitlab-ce into 12760-filter-commits-by-author
    • 4712945d - Make #find_commits_by_message_or_author take in named params

    Compare with previous version

  • @nadiavu just wanted to check in on this :slight_smile: I see you pushed some more changes; should we take another look?

  • Hi @smcgivern ,Sorry, been full on at work since I have started a new gig. Think I need a few more days. Also Im having some issues trying to flip the switch on Gitaly. Any tips?

  • @nadiavu no worries, feel free to take your time - I just wanted to check!

    For the Gitaly thing, I'm not sure exactly what you're looking for, but I think there are two things here:

    1. To disable Gitaly for this method, you can do Feature.disable(:gitaly_commits_by_message) in a Rails console. To enable it, do Feature.enable.
    2. I think for this MR right now, we don't need to worry about implementing the feature in Gitaly. We should, however, ensure that when searching by author, we don't go to Gitaly (even if the feature is enabled), as Gitaly doesn't support it.

    Does that help?

  • Please register or sign in to reply
    Loading