question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cleanup pull-request from clutter

See original GitHub issue

Description

Sometimes pull-requests stay open longer than expected and pile up a lot of X previously approved these changes N days ago and Y dismissed X's stale review via C N days ago… Maybe in combination with M hidden items yielding more of previous examples after expanded…

This makes the pull-request view quite unusable because you need to scroll 4000px (just looked it up in one of my PRs) until you get to the important stuff.

An option to clean that up IMHO would be a great addition and would help the user to work more efficiently.

A simple “cleanup” which might be suitable to demonstrate the effect would be this one:

[...document.querySelectorAll('.js-timeline-item')].filter(itm => {
    const html = itm.innerHTML
    return html.includes('previously approved') || (html.includes('stale review') && html.includes('dismissed'))
}).forEach(itm => itm.parentElement.removeChild(itm))

Sadly this needs to be re-applied every time a M hidden items section is expanded.

Screenshot

Before / default state image

After / cleaned image

Example URL

Not providing an URL below as all example PRs are in private repos having a branch protection with “Dismiss stale pull request approvals when new commits are pushed” active.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
fregantecommented, Apr 9, 2022

We can definitely include stale reviews in the “collapsed comments” filter, which are currently never hidden: https://github.com/refined-github/sandbox/pull/10#event-6400656397

Screen Shot 2

Maybe another level “hide stale stuff” keeping commits

I wonder if we should always just keep commits visible instead. The feature was designed around issue conversations and then the PR followed. I think commits are an important part of PRs (uh, which seems obvious) so maybe we should never hide them.

Both of these changes would fix it for you.

1reaction
fregantecommented, Apr 8, 2022

I think we already do this as part of the filter-conversation-activity feature or whatever it’s called

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clean up your commits for a pull request - Christoph Rumpel
When you contribute to an Open Source project through a pull request, the maintainer often wants you to clean up your commits.
Read more >
Delete a closed pull request from GitHub - Stack Overflow
There is no way you can delete a pull request yourself -- you and the repo owner (and all users with push access...
Read more >
Clean GIT history — a Step by Step Guide | by Catalina Turlea
In this article you can find a step-by-step guide how to move away from difficult to understand clean up your git commit history....
Read more >
How to Split Pull Requests – Good Practices, Methods and Git ...
Find out how to split large Pull Request into several smaller ones. ... If it's extra work on code clean up, that's still...
Read more >
Clutter Cleanup Service | Address Our Mess
Clutter Clean up can vary from a few rooms needing major cleanup to a whole house. Our professional staff is trained and experienced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found