Skip to content

(Team3) regex testcases internal merge#123

Merged
zuozhiw merged 4 commits into
team3-regex-testcasesfrom
team3-regex-datareader
May 25, 2016
Merged

(Team3) regex testcases internal merge#123
zuozhiw merged 4 commits into
team3-regex-testcasesfrom
team3-regex-datareader

Conversation

@zuozhiw

@zuozhiw zuozhiw commented May 25, 2016

Copy link
Copy Markdown
Contributor

Since dataReader is already changed. team3-regex-dataReader no longer needs to exist.
Merge team3-regex-datareader into another branch: team3-regex-testcases.

@zuozhiw zuozhiw merged commit 10825d3 into team3-regex-testcases May 25, 2016
@zuozhiw zuozhiw deleted the team3-regex-datareader branch May 25, 2016 02:15
@chenlica

Copy link
Copy Markdown
Contributor

@zuozhi Please make sure to modularize your PR to make the reviews easier. Do not give me a big PR :-)

@zuozhiw

zuozhiw commented May 25, 2016

Copy link
Copy Markdown
Contributor Author

@chenlica I won't push anything to the current Regex Translator PR until we talked on Thursday. Currently I'm fixing bugs, adding more test cases, and doing performance test in team3-regex-testcases branch.

@chenlica

Copy link
Copy Markdown
Contributor

@zuozhi 👍

Yicong-Huang added a commit that referenced this pull request May 3, 2026
…rt message (#4696)

### What changes were proposed in this PR?

Direct backports currently append the `(backported from commit X)` note
at the very end of the commit message. Because GitHub's squash-merge
messages already carry a trailer block (`Co-Authored-By:` etc.) at the
end, the note ends up *after* the trailers:

```
fix: foo

Body.

Closes #123.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

(backported from commit abc1234)        ← currently here
```

Git treats the trailer block as the contiguous run of `Key: value` lines
at the very end of the message, separated from the body by a blank line.
With a non-trailer line trailing the trailer block, `git
interpret-trailers --parse` sees zero trailers — tools that read
Co-Authored-By, Signed-off-by, etc. lose the metadata for backport
commits.

This PR re-orders the composition so the body comes first, then the
`(backported from commit X)` note as its own paragraph, then the trailer
block at the very end:

```
fix: foo

Body.

Closes #123.

(backported from commit abc1234)        ← moved here

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
```

A small Python step inside the workflow splits the original message at
the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s`
heuristic and reassembles. Cases handled:

| input | output |
|---|---|
| body + trailers | body + blank + note + blank + trailers |
| body, no trailers | body + blank + note |
| multiple trailers | body + blank + note + blank + all trailers
contiguous |

### Any related issues, documentation, discussions?

None — incidental fix to the backport job alongside the broader CI
cleanup work.

### How was this PR tested?

Ran the assembled Python step locally against five synthetic message
shapes:

| input | result |
|---|---|
| subject only (`docs: typo fix`) | subject + blank + note |
| subject + body, no trailers | subject + body + blank + note |
| subject + body + single trailer | subject + body + blank + note +
blank + trailer |
| subject + body + multiple trailers | subject + body + blank + note +
blank + all trailers contiguous |
| body containing a non-trailer `Word:` line | subject + body + blank +
note (body line not mis-classified) |

The last case is the trailer-detection tightening: a trailer block
exists only when there is a blank line in the message AND every line
after the last blank line is in trailer format. That avoids treating a
Conventional Commits subject (`feat: foo` for a one-line commit) as a
one-line trailer block.

The next direct-backport CI run on this branch's merge will exercise the
path end-to-end.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7, 1M context)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang added a commit that referenced this pull request May 3, 2026
…rt message (#4696)

### What changes were proposed in this PR?

Direct backports currently append the `(backported from commit X)` note
at the very end of the commit message. Because GitHub's squash-merge
messages already carry a trailer block (`Co-Authored-By:` etc.) at the
end, the note ends up *after* the trailers:

```
fix: foo

Body.

Closes #123.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

(backported from commit abc1234)        ← currently here
```

Git treats the trailer block as the contiguous run of `Key: value` lines
at the very end of the message, separated from the body by a blank line.
With a non-trailer line trailing the trailer block, `git
interpret-trailers --parse` sees zero trailers — tools that read
Co-Authored-By, Signed-off-by, etc. lose the metadata for backport
commits.

This PR re-orders the composition so the body comes first, then the
`(backported from commit X)` note as its own paragraph, then the trailer
block at the very end:

```
fix: foo

Body.

Closes #123.

(backported from commit abc1234)        ← moved here

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
```

A small Python step inside the workflow splits the original message at
the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s`
heuristic and reassembles. Cases handled:

| input | output |
|---|---|
| body + trailers | body + blank + note + blank + trailers |
| body, no trailers | body + blank + note |
| multiple trailers | body + blank + note + blank + all trailers
contiguous |

### Any related issues, documentation, discussions?

None — incidental fix to the backport job alongside the broader CI
cleanup work.

### How was this PR tested?

Ran the assembled Python step locally against five synthetic message
shapes:

| input | result |
|---|---|
| subject only (`docs: typo fix`) | subject + blank + note |
| subject + body, no trailers | subject + body + blank + note |
| subject + body + single trailer | subject + body + blank + note +
blank + trailer |
| subject + body + multiple trailers | subject + body + blank + note +
blank + all trailers contiguous |
| body containing a non-trailer `Word:` line | subject + body + blank +
note (body line not mis-classified) |

The last case is the trailer-detection tightening: a trailer block
exists only when there is a blank line in the message AND every line
after the last blank line is in trailer format. That avoids treating a
Conventional Commits subject (`feat: foo` for a one-line commit) as a
one-line trailer block.

The next direct-backport CI run on this branch's merge will exercise the
path end-to-end.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7, 1M context)

---------

(backported from commit a5b8957)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang pushed a commit to Yicong-Huang/texera that referenced this pull request May 4, 2026
…ut-merge

Two review-driven fixes for the PR-assignment workflow:

1. The body-diff regex used to detect removed closing references now
   accepts the colon form ("Closes: apache#123") in addition to the bare
   "closes apache#123" form. The behavior on multiple refs per line
   ("Closes #1, #2") is unchanged and matches `closingIssuesReferences`
   semantics — only #1 is treated as a closing ref. Verified against 12
   shape variants (uppercase/colon/multi-line/non-keyword).

2. New step: when a PR is closed without being merged, remove the opener
   from each same-repo closing-reference issue. Previously, abandoned
   PRs left the opener as a stale assignee with `triage` removed. The
   issue-triage workflow's unassigned handler then re-adds `triage` if
   no other assignees remain. Cross-repo refs are skipped, consistent
   with the assign side. Bot-opened PRs are excluded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…rt message (apache#4696)

### What changes were proposed in this PR?

Direct backports currently append the `(backported from commit X)` note
at the very end of the commit message. Because GitHub's squash-merge
messages already carry a trailer block (`Co-Authored-By:` etc.) at the
end, the note ends up *after* the trailers:

```
fix: foo

Body.

Closes apache#123.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

(backported from commit abc1234)        ← currently here
```

Git treats the trailer block as the contiguous run of `Key: value` lines
at the very end of the message, separated from the body by a blank line.
With a non-trailer line trailing the trailer block, `git
interpret-trailers --parse` sees zero trailers — tools that read
Co-Authored-By, Signed-off-by, etc. lose the metadata for backport
commits.

This PR re-orders the composition so the body comes first, then the
`(backported from commit X)` note as its own paragraph, then the trailer
block at the very end:

```
fix: foo

Body.

Closes apache#123.

(backported from commit abc1234)        ← moved here

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
```

A small Python step inside the workflow splits the original message at
the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s`
heuristic and reassembles. Cases handled:

| input | output |
|---|---|
| body + trailers | body + blank + note + blank + trailers |
| body, no trailers | body + blank + note |
| multiple trailers | body + blank + note + blank + all trailers
contiguous |

### Any related issues, documentation, discussions?

None — incidental fix to the backport job alongside the broader CI
cleanup work.

### How was this PR tested?

Ran the assembled Python step locally against five synthetic message
shapes:

| input | result |
|---|---|
| subject only (`docs: typo fix`) | subject + blank + note |
| subject + body, no trailers | subject + body + blank + note |
| subject + body + single trailer | subject + body + blank + note +
blank + trailer |
| subject + body + multiple trailers | subject + body + blank + note +
blank + all trailers contiguous |
| body containing a non-trailer `Word:` line | subject + body + blank +
note (body line not mis-classified) |

The last case is the trailer-detection tightening: a trailer block
exists only when there is a blank line in the message AND every line
after the last blank line is in trailer format. That avoids treating a
Conventional Commits subject (`feat: foo` for a one-line commit) as a
one-line trailer block.

The next direct-backport CI run on this branch's merge will exercise the
path end-to-end.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7, 1M context)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants