Skip to content

Commit 1845546

Browse files
tisniksamdoran
authored andcommitted
Add cherry_picker config and update valid prefixes
(cherry picked from commit 4861ba6)
1 parent 29a00b0 commit 1845546

6 files changed

Lines changed: 103 additions & 12 deletions

File tree

.cherry_picker.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
team = "lightspeed-core"
2+
repo = "lightspeed-stack"
3+
check_sha = "ea5de69d94e33aa2a75a622fec455bc4b0fa6c6b"
4+
fix_commit_msg = false
5+
default_branch = "main"

.github/pr-title-checker-config.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
"color": "EEEEEE"
55
},
66
"CHECKS": {
7-
"prefixes": ["LCORE-", "RSPEED-", "MGTM-", "OLS-", "RHDHPAI-", "LEADS-"]
7+
"prefixes": [
8+
"LCORE-",
9+
"RSPEED-",
10+
"MGTM-",
11+
"OLS-",
12+
"RHIDP-",
13+
"LEADS-",
14+
"CWFHEALTH-",
15+
"[release/"
16+
]
817
},
918
"MESSAGES": {
1019
"success": "All OK",

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,15 @@ uv run make test-e2e # End-to-end tests
191191
- **SQLAlchemy**: Database ORM
192192
- **Kubernetes**: K8s auth integration
193193

194+
## Pull Request Requirements
195+
196+
**PR titles MUST start with a JIRA issue key prefix.** CI enforces this via `pr-title-checker` (config: `.github/pr-title-checker-config.json`).
197+
198+
Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, `CWFHEALTH-`, `[release/`
199+
200+
-`RSPEED-2849: add user_agent to ResponsesEventData`
201+
-`feat(observability): add user_agent to ResponsesEventData`
202+
194203
## Development Workflow
195204
1. Use `uv sync --group dev --group llslibdev` for dependencies
196205
2. Always use `uv run` prefix for commands

CONTRIBUTING.md

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* [PR description](#pr-description)
1111
* [Definition of Done](#definition-of-done)
1212
* [A deliverable is to be considered “done” when](#a-deliverable-is-to-be-considered-done-when)
13+
* [Backports](#backports)
1314
* [AI assistants](#ai-assistants)
1415
* [“Mark” code with substantial AI-generated portions.](#mark-code-with-substantial-ai-generated-portions)
1516
* [Copyright and licence notices](#copyright-and-licence-notices)
@@ -97,12 +98,72 @@ Happy hacking!
9798

9899
## PR description
99100

100-
* Jira ticket needs to be added into PR title, for example: `LCORE-740: type hints for models unit tests`
101+
* PR titles must start with a JIRA issue key prefix or the target branch of a backport in brackets. CI enforces this via
102+
`pr-title-checker` (config: `.github/pr-title-checker-config.json`).
103+
Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`,
104+
`CWFHEALTH-`, `[release/`
105+
- for example: `LCORE-740: type hints for models unit tests`
101106
* Fill-in all relevant information in the PR template
102107
- unused parts of PR template (like information about testing etc.) can be deleted
103108
* Please note that CodeRabbitAI will create a summary of your pull request
104109

105110

111+
112+
## Backports
113+
114+
We use [cherry_picker](https://pypi.org/project/cherry-picker/) to backport
115+
merged pull requests to release branches. See the
116+
[cherry_picker documentation](https://cherry-picker.readthedocs.io/) for full
117+
details.
118+
119+
### Installation
120+
121+
```bash
122+
pip install --user cherry_picker
123+
```
124+
125+
### Usage
126+
127+
After a pull request has been merged to `main`, you can backport it to one or
128+
more release branches:
129+
130+
```bash
131+
# backport to a single release branch
132+
cherry_picker <commit-sha> release/0.6
133+
134+
# backport to multiple release branches
135+
cherry_picker <commit-sha> release/0.5 release/0.6
136+
```
137+
138+
`cherry_picker` will create a new branch, cherry-pick the commit, and open a
139+
pull request against the target release branch.
140+
141+
If the commit you want to backport is a **merge commit**, append `^-` to the
142+
hash so that `cherry_picker` applies the correct parent diff:
143+
144+
```bash
145+
cherry_picker <merge-commit-sha>^- release/0.6
146+
```
147+
148+
If there are conflicts, `cherry_picker` will pause and let you resolve them.
149+
After resolving:
150+
151+
```bash
152+
git add .
153+
cherry_picker --continue
154+
```
155+
156+
To abort a backport in progress:
157+
158+
```bash
159+
cherry_picker --abort
160+
```
161+
162+
See the [branching documentation](docs/branching.md) for more details on our
163+
branching strategy and release workflow.
164+
165+
166+
106167
## Definition of Done
107168

108169
### A deliverable is to be considered “done” when
@@ -125,7 +186,7 @@ Happy hacking!
125186
Nontrivial and substantial AI-generated or AI-assisted content should be
126187
“marked” in appropriate cases. In deciding how to approach this, consider
127188
adopting one or more of the following recommendations. (This assumes you have
128-
not concluded that a suggestion is a match to some existing third-party code.)
189+
not concluded that a suggestion is a match to some existing third-party code.)
129190

130191
In a commit message, or in a pull request/merge request description field,
131192
identify the code assistant that you used, perhaps elaborating on how it was
@@ -271,14 +332,14 @@ Here is simple example:
271332
```python
272333
def function_with_pep484_type_annotations(param1: int, param2: str) -> bool:
273334
"""Example function with PEP 484 type annotations.
274-
335+
275336
Args:
276337
param1: The first parameter.
277338
param2: The second parameter.
278-
339+
279340
Returns:
280341
The return value. True for success, False otherwise.
281-
342+
282343
Raises:
283344
ValueError: If the first parameter does not contain proper model name
284345
"""

docs/contributing_guide.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ Happy hacking!
9898

9999
## PR description
100100

101-
* Jira ticket needs to be added into PR title, for example: `LCORE-740: type hints for models unit tests`
101+
* PR titles must start with a JIRA issue key prefix or the target branch of a backport. CI enforces this via
102+
`pr-title-checker` (config: `.github/pr-title-checker-config.json`).
103+
Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`,
104+
`CWFHEALTH-`, `[release/`
105+
- for example: `LCORE-740: type hints for models unit tests`
102106
* Fill-in all relevant information in the PR template
103107
- unused parts of PR template (like information about testing etc.) can be deleted
104108
* Please note that CodeRabbitAI will create a summary of your pull request
@@ -161,7 +165,7 @@ without Claude Code.
161165
Nontrivial and substantial AI-generated or AI-assisted content should be
162166
“marked” in appropriate cases. In deciding how to approach this, consider
163167
adopting one or more of the following recommendations. (This assumes you have
164-
not concluded that a suggestion is a match to some existing third-party code.)
168+
not concluded that a suggestion is a match to some existing third-party code.)
165169

166170
In a commit message, or in a pull request/merge request description field,
167171
identify the code assistant that you used, perhaps elaborating on how it was
@@ -307,14 +311,14 @@ Here is simple example:
307311
```python
308312
def function_with_pep484_type_annotations(param1: int, param2: str) -> bool:
309313
"""Example function with PEP 484 type annotations.
310-
314+
311315
Args:
312316
param1: The first parameter.
313317
param2: The second parameter.
314-
318+
315319
Returns:
316320
The return value. True for success, False otherwise.
317-
321+
318322
Raises:
319323
ValueError: If the first parameter does not contain proper model name
320324
"""

docs/demos/lcore/contributing_guidelines.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ ptisnovs@redhat.com
7474

7575
## PR description
7676

77-
* Jira ticket needs to be added into PR title
77+
* PR titles must start with a JIRA issue key prefix. CI enforces this via
78+
`pr-title-checker` (config: `.github/pr-title-checker-config.json`).
79+
Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`,
80+
`CWFHEALTH-`, `[release/`
7881
- for example: `LCORE-740: type hints for models unit tests`
7982
* Fill-in all relevant information in the PR template
8083
- unused parts of PR template (like information about testing etc.) can be deleted

0 commit comments

Comments
 (0)