Skip to content

Commit e8fd55a

Browse files
Merge branch 'dev' into order_by_improvement
2 parents 4c10e55 + 7b152a7 commit e8fd55a

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.backportrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"repoOwner": "Neo4j",
3+
"repoName": "docs-cypher",
4+
"prTitle": "[Cherry-pick][{{targetBranch}}] {{commitMessages}}"
5+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: auto-cherry-pick
2+
on:
3+
pull_request_target:
4+
types: ["closed"]
5+
6+
jobs:
7+
backport:
8+
name: Cherry-pick PR
9+
runs-on: [ubuntu-latest]
10+
if: |
11+
github.event.pull_request.merged == true
12+
&& contains(github.event.pull_request.labels.*.name, 'cherry-pick')
13+
&& github.event.action == 'closed'
14+
steps:
15+
- name: Cherry-pick action
16+
uses: sorenlouv/backport-github-action@929f69d04adbc196d982e60f02837b6cc00b3129
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
auto_backport_label_prefix: cherry-pick-to-
20+
add_original_reviewers: false
21+
22+
- name: Info log
23+
if: ${{ success() }}
24+
run: cat ~/.backport/backport.info.log
25+
26+
- name: Debug log
27+
if: ${{ failure() }}
28+
run: cat ~/.backport/backport.debug.log

README.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,37 @@ There are a few edge cases where we might want to work only on the current branc
7878
* When a new version is ready to published, the `5.x` branch will get a git tag, named with the exact version (for example, **5.1.0**), signifying that this point-in-time marks the completion of the work for that minor release.
7979
* Updates merged into the `dev` branch for the next release are cherry-picked into the `5.x` branch.
8080

81+
82+
=== Enable automatic cherry-picking on a PR
83+
84+
To enable automatic cherry-picking on a PR, add the label `cherry-pick` to it.
85+
Without it, the responsible GitHub action is not going to be triggered.
86+
87+
To select the target branches you would like to cherry-pick your PR to, add labels of the following structure: `cherry-pick-to-<targetBranch>`.
88+
For example: `cherry-pick-to-cypher-25` to cherry-pick it to the branch `cypher-25` or `cherry-pick-to-5.x` for the branch `5.x`.
89+
You may even add new labels for branches that do not have such a label yet.
90+
91+
The feature is triggered by either merging a PR with the `cherry-pick` label or by adding the `cherry-pick` label to an already closed and merged PR.
92+
In the latter case, ensure that you first add the labels containing the target branches and then finally the `cherry-pick` label.
93+
Otherwise the automation starts without any target branches.
94+
95+
96+
==== Details
97+
98+
The PRs created by this GitHub action will have their heading prefixed with `[Cherry-pick][<targetBranch>]`.
99+
So, for example, for `6.x` as the target branch and `some changes` as the original PR heading, it results in `[Cherry-pick][6.x] some changes` as the heading for the cherry-picked PR.
100+
In case an assignee was set for the original PR, the cherry-picked PRs will also receive the same assignee.
101+
You must add reviewers manually after the cherry-picked PRs have been created.
102+
103+
The creation of cherry-picked PRs can take a few minutes.
104+
If you are an assignee of the original PR, you receive an email notification once the cherry-picked PRs have been created.
105+
The original PR is updated with a comment that contains links to the newly created cherry-picked PRs.
106+
107+
In case of a merge conflict while cherry-picking to a specific release branch, the branch will be skipped. Information on skipped branches is also included in the comment added to the original PR.
108+
In that case you will have to take care of cherry-picking manually and resolve the conflicts.
109+
This is not going to influence the other release branches as long as they do not have conflicts.
110+
111+
81112
[[documenting-changes]]
82113
== Documenting changes to Cypher
83114

@@ -117,3 +148,4 @@ When documenting a new Cypher feature, its relationship with GQL must be conside
117148
* If the feature is part of GQL's optional features, it should be recorded on the page xref:modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc[Supported optional GQL features].
118149
* if the feature adds functionality for which there exists an analogous, optional GQL feature, it should be recorded on the page xref:modules/ROOT/pages/appendix/gql-conformance/analogous-cypher.adoc[Optional GQL features and analogous Cypher].
119150
* If the feature adds functionality for which there exists no GQL equivalent, it should be recorded on the page xref:modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc[Additional Cypher features].
151+

0 commit comments

Comments
 (0)