Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove PR details on squash&merge #1322

Closed
hubertgrzeskowiak opened this issue May 13, 2018 · 5 comments
Closed

Remove PR details on squash&merge #1322

hubertgrzeskowiak opened this issue May 13, 2018 · 5 comments

Comments

@hubertgrzeskowiak
Copy link

At my company we only use the squash & merge strategy. Each time you press the button, the commit form is pre-filled with all commit messages from the PR. This is redundant, since the PR contains all commits and it is linked anyways. What we do is selecting all the text in the textarea and remove it each time we merge a PR. This is tedious and sounds like something that could be automated using refined-github.

@hubertgrzeskowiak
Copy link
Author

hubertgrzeskowiak commented May 13, 2018

I've got this code, which is working for me through the dev tools console, but I could use some help in creating a real extension from this:

document.querySelector(".merge-message .btn-group-squash button")
  .addEventListener("click", function() {
    document.querySelector(".merge-branch-form .merge-commit-message").value = ""
  }
);

@hubertgrzeskowiak
Copy link
Author

hubertgrzeskowiak commented May 13, 2018

I think best would be a Cookie-backed opt-in to disable the extended commit messages on PRs for a repository. I imagine a check-box that, once clicked, will completely remove the textarea.

@hkdobrev
Copy link
Contributor

I like this functionality as it mimics other tools for managing your workflow and code reviews. People who look at the squashed commit not on GitHub still benefit from that information.

@fregante
Copy link
Member

Someone sent a similar solution (#1312) which, instead of simply clearing it, uses the first post's message.

@fregante
Copy link
Member

@hkdobrev maybe I hang out in poor repos, but the commit list usually looks like this:

* Add hotkeys on Pull Request tabs

* Fix eslint errors

* Loop it up

* Further simplify selector

* Cycle through tabs

* Use .dataset

* Change hotkeys and fix broken cycle

* Add shortcut in help dialog & readme

* Fix linting

* Little fix

* Shorten readme description

* Use `g` key

Is it useful?

I'd say that if single commit information is useful, the PR should be merged with a merge commit, not squashed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

No branches or pull requests

3 participants