This fixes the paragraph splitting done in the pr-format.py script. If a
line contains a triple backtick, the script will consider it markdown
and adjust the formatting accordingly.
Reviewers: TengYao Chi <frankvicky@apache.org>, Ken Huang <s7133700@gmail.com>, Jhen-Yung Hsu <jhenyunghsu@gmail.com>
This patch fixes the textwrap for Reviewers to support the RFC 822
folding rules. From the RFC, headers or trailers can break across
multiple lines if there is a leading whitespace on subsequent lines.
This allows "git interpret-trailers" to correctly parse long
"Reviewers:" lines.
Reviewers: Lianet Magrans <lmagrans@confluent.io>
Parse the body of a PR and re-format it to a text wrap of 72 characters.
Since GitHub will do this automatically when merging PRs with the merge
queue, we should do our best to pre-format the commit message.
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Adds two new workflows to help us enforce some uniform PR structure. The
first workflow runs in an unprivileged context and simply captures the
PR number into a text file and archives it. This is then used by another
workflow that runs in a privileged context using the code in `trunk` to
actually do the validation.
The validation is done using a new Python script. This script fetches a
PR using the GitHub CLI and validates its structure. For now this just
includes the title and body, but could perform other non-code related
checks in the future.
This validation is needed for the up-coming merge queue functionality.
Reviewers: Justine Olshan <jolshan@confluent.io>