Bug 231023 - [webkitscmpy] Generate commit message template
Summary: [webkitscmpy] Generate commit message template
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-30 09:14 PDT by Jonathan Bedard
Modified: 2021-10-27 17:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch (13.12 KB, patch)
2021-09-30 09:29 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (13.86 KB, patch)
2021-09-30 11:29 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (15.01 KB, patch)
2021-09-30 12:06 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (15.15 KB, patch)
2021-10-06 17:45 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (14.86 KB, patch)
2021-10-13 09:50 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (14.78 KB, patch)
2021-10-14 08:37 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (3.62 KB, patch)
2021-10-27 17:03 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].