Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Merge-Queue] Add author to commit message #242

Conversation

JonWBedard
Copy link
Member

@JonWBedard JonWBedard commented Apr 4, 2022

1e8eb307daa055dde54e7c11f60d4153ac9bd325

[Merge-Queue] Add author to commit message
https://bugs.webkit.org/show_bug.cgi?id=238752
<rdar://problem/91254339 >

Reviewed by Aakash Jain.

svn.webkit.org will attribute a change to a specific author
if "Patch by" is in the commit message.

* Tools/CISupport/ews-build/factories.py:
(MergeQueueFactory.__init__): Add AddAuthorToCommitMessage step.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps): Ditto.
* Tools/CISupport/ews-build/master.cfg: Determine commit author from github.head.user.login.
* Tools/CISupport/ews-build/steps.py:
(AddAuthorToCommitMessage):
(AddAuthorToCommitMessage.__init__):
(AddAuthorToCommitMessage.author): Return commit author's name and email, falling back
to the committers name and email if those cannot be determined.
(AddAuthorToCommitMessage.start): Insert "Patch by" into commit message.
(AddAuthorToCommitMessage.getResultSummary):
(AddAuthorToCommitMessage.doStepIf): Only do step if the author can be determined.
(AddAuthorToCommitMessage.hideStepIf): Hide step if skipped.
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/249265@main

@JonWBedard JonWBedard self-assigned this Apr 4, 2022
@JonWBedard JonWBedard requested a review from aj062 April 4, 2022 19:16
@JonWBedard JonWBedard added Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases WebKit Nightly Build merge-queue Applied to send a pull request to merge-queue and removed merge-queue Applied to send a pull request to merge-queue labels Apr 4, 2022
@aj062 aj062 added the merge-queue Applied to send a pull request to merge-queue label Apr 4, 2022
@JonWBedard JonWBedard removed the merge-queue Applied to send a pull request to merge-queue label Apr 4, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label Apr 5, 2022
@JonWBedard JonWBedard removed the merging-blocked Applied to prevent a change from being merged label Apr 5, 2022
@JonWBedard
Copy link
Member Author

JonWBedard commented Apr 5, 2022

https://ews-build.webkit-uat.org/#/builders/85/builds/156 shows this change working


def getResultSummary(self):
if self.results == FAILURE:
return {'step': 'Failed to add author'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message can be more descriptive. failed to add author, where?

@JonWBedard JonWBedard force-pushed the eng/Merge-Queue-Add-author-to-commit-message branch 2 times, most recently from c3e03de to b105590 Compare April 5, 2022 17:47
@JonWBedard JonWBedard added the merge-queue Applied to send a pull request to merge-queue label Apr 5, 2022
https://bugs.webkit.org/show_bug.cgi?id=238752
<rdar://problem/91254339>

Reviewed by Aakash Jain.

svn.webkit.org will attribute a change to a specific author
if "Patch by" is in the commit message.

* Tools/CISupport/ews-build/factories.py:
(MergeQueueFactory.__init__): Add AddAuthorToCommitMessage step.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps): Ditto.
* Tools/CISupport/ews-build/master.cfg: Determine commit author from github.head.user.login.
* Tools/CISupport/ews-build/steps.py:
(AddAuthorToCommitMessage):
(AddAuthorToCommitMessage.__init__):
(AddAuthorToCommitMessage.author): Return commit author's name and email, falling back
to the committers name and email if those cannot be determined.
(AddAuthorToCommitMessage.start): Insert "Patch by" into commit message.
(AddAuthorToCommitMessage.getResultSummary):
(AddAuthorToCommitMessage.doStepIf): Only do step if the author can be determined.
(AddAuthorToCommitMessage.hideStepIf): Hide step if skipped.
* Tools/CISupport/ews-build/steps_unittest.py:
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Merge-Queue-Add-author-to-commit-message branch from b105590 to 2ac1aa4 Compare April 5, 2022 17:57
@JonWBedard JonWBedard removed the merge-queue Applied to send a pull request to merge-queue label Apr 5, 2022
@JonWBedard
Copy link
Member Author

@JonWBedard JonWBedard closed this Apr 5, 2022
@JonWBedard JonWBedard deleted the eng/Merge-Queue-Add-author-to-commit-message branch April 5, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
3 participants