Bug 231023

Summary: [webkitscmpy] Generate commit message template
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: dewei_zhu, jlewis3, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231345
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Jonathan Bedard 2021-09-30 09:14:00 PDT
webkitscmpy should provide support for generating a prepare-commit-msg script. Although this change does not yet provide a replace for prepare-ChangeLog, it does allow us to leverage the existing script while decoupling that script from webkitscmpy.
Comment 1 Radar WebKit Bug Importer 2021-09-30 09:25:45 PDT
<rdar://problem/83722871>
Comment 2 Jonathan Bedard 2021-09-30 09:29:55 PDT
Created attachment 439744 [details]
Patch
Comment 3 Jonathan Bedard 2021-09-30 10:36:16 PDT
The technique I'm using here is not exactly standard.

We want to continue to have `git-webkit setup` be repository agnostic, but we also want repositories to be able to define their own commit message formats. In order to achieve this, we're essentially writing a Python file from scratch. But we would like to retain syntax high-lighting and style-checking for the generated code, which is where the `inspect` module comes in. What we're basically doing is defining a function, then extracting the source code of that function and putting it into the generated file. As an added wrinkle, in order of this to be repository agnostic, if the `git-webkit` entry-point would like to define a script to be used to generate the commit message, that script should be defined relative to `git-webkit`, not the generated script (which could be anywhere on a given machine)
Comment 4 Jonathan Bedard 2021-09-30 11:29:32 PDT
Created attachment 439761 [details]
Patch
Comment 5 Jonathan Bedard 2021-09-30 12:06:27 PDT
Created attachment 439765 [details]
Patch
Comment 6 Jonathan Bedard 2021-09-30 12:06:42 PDT
Pull-request: https://github.com/WebKit/WebKit/pull/13
Comment 7 Jonathan Bedard 2021-10-06 17:45:49 PDT
Created attachment 440460 [details]
Patch
Comment 8 Jonathan Bedard 2021-10-13 09:50:03 PDT
Created attachment 441094 [details]
Patch
Comment 9 Jonathan Bedard 2021-10-14 08:37:28 PDT
Created attachment 441219 [details]
Patch
Comment 10 Jonathan Bedard 2021-10-19 13:14:14 PDT
Committed r284485 (243242@main): <https://commits.webkit.org/243242@main>
Comment 11 Jonathan Bedard 2021-10-19 13:36:44 PDT
Committed r284491 (243245@main): <https://commits.webkit.org/243245@main>
Comment 12 Jonathan Bedard 2021-10-27 17:03:49 PDT
Reopening to attach new patch.
Comment 13 Jonathan Bedard 2021-10-27 17:03:52 PDT
Created attachment 442653 [details]
Patch for landing
Comment 14 EWS 2021-10-27 17:31:49 PDT
Committed r284966 (243617@main): <https://commits.webkit.org/243617@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442653 [details].