kubernetes / test-infra

Test infrastructure for the Kubernetes project.
Apache License 2.0
3.82k stars 2.64k forks source link

plugin to block "fixes #123" in commit messages #9360

Closed BenTheElder closed 5 years ago

BenTheElder commented 6 years ago

this causes issues to repeatedly close when people merge into their forks, we should build a plugin to add a do-not-merge/* label to PRs that contain these types of strings in their commit messages

per discussion with @liggitt

/sig contributor-experience /sig testing /area prow /kind feature cc @cjwagner @stevekuznetsov

This is similar to the merge commits blocker https://github.com/kubernetes/test-infra/issues/5376

guineveresaenger commented 6 years ago

Can we explicitly list which types of strings?

liggitt commented 6 years ago

from https://help.github.com/articles/closing-issues-using-keywords/

one of those keywords followed by [\s:]+(\w+/\w+)?#\d+

also, not sure if you want to track it with this or separately, but preventing nick mentions in commit descriptions would be a boon to anyone who gets a hundred emails when a commit mentioning them gets pulled into all the various forks of a repo

nikhita commented 6 years ago

preventing nick mentions in commit descriptions would be a boon to anyone who gets a hundred emails when a commit mentioning them gets pulled into all the various forks of a repo

+100. Let’s please make this happen!

nikhita commented 6 years ago

@BenTheElder Re nick mentions: would this also mean that we would need to forbid @ mentions in the main PR body?

I think tide does not add the whole PR body in the merge commit message so this should not be needed but I'm not sure.

BenTheElder commented 6 years ago

We do not add the PR body anymore IIRC @cjwagner to confirm.

spiffxp commented 6 years ago

We do not

spiffxp@spiffxp-macbookpro:kubernetes (master %)$ git log --merges
commit 45c5ddd2fb8f10e097483257663fa6a7be59ffa9
Merge: 7bfd0d358c 55199a04be
Author: k8s-ci-robot <k8s-ci-robot@users.noreply.github.com>
Date:   Tue Sep 11 13:27:50 2018 -0700

    Merge pull request #68494 from k82cn/k8s_67606_2

    Added default tolerations for new pods.
stevekuznetsov commented 6 years ago

Both suggestions SGTM /help

nikhita commented 6 years ago

I'll take a dab at this.

nikhita commented 6 years ago

Created a PR: https://github.com/kubernetes/test-infra/pull/9387

/remove-help

spiffxp commented 6 years ago

/assign @nikhita

jberkus commented 5 years ago

Hey, looks like @nikhita is tackling the "invalid commit message", but NOT the "remove 'fixes'" issue.

Does anyone want to take on removing "fixes" statements? I'm having to reopen failing test issues all over the place now ...

cjwagner commented 5 years ago

I'm having to reopen failing test issues all over the place now ...

@jberkus Is that from "fixes" statements in commit messages or just in the PR body text?

nikhita commented 5 years ago

looks like @nikhita is tackling the "invalid commit message", but NOT the "remove 'fixes'" issue.

The PR also tackles the "fixes" issue in commit messages. But I probably won't have time to complete the PR this week. :(

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

nikhita commented 5 years ago

/remove-lifecycle rotten /lifeycle active