Summary: | [webkitscmpy] Generate commit message template | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||||||||||||
Component: | Tools / Tests | Assignee: | 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
Jonathan Bedard
2021-09-30 09:14:00 PDT
Created attachment 439744 [details]
Patch
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) Created attachment 439761 [details]
Patch
Created attachment 439765 [details]
Patch
Pull-request: https://github.com/WebKit/WebKit/pull/13 Created attachment 440460 [details]
Patch
Created attachment 441094 [details]
Patch
Created attachment 441219 [details]
Patch
Committed r284485 (243242@main): <https://commits.webkit.org/243242@main> Committed r284491 (243245@main): <https://commits.webkit.org/243245@main> Reopening to attach new patch. Created attachment 442653 [details]
Patch for landing
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]. |