Skip to content

Commit

Permalink
docs: adjust README
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods committed Dec 3, 2024
1 parent 2432d1b commit de673b4
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
## Automatic cherry-picking
# Automatic cherry-picking

Cherry-picks commits from a merged PR, creating a new PR to a target branch.
Allows setting a name of a submodule and will automatically fast-forward it to
also match the `target-branch`.

Check [action.yml](action.yml) for a description of inputs and outputs.

### Configuration sample:
### Configuration sample

```yaml
name: 'Cherry pick Release/candidate into develop'
on:
pull_request:
branches:
- release/candidate # Branches where the original PRs will be merged
types:
- closed
pull_request:
branches:
- release/candidate # Branches where the original PRs will be merged
types:
- closed

jobs:
test-cherry-pick:
runs-on: ubuntu-latest
name: Test the cherry-pick action
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive #If you need to operate on submodules

- name: Cherry pick
id: cherry-pick
uses: wireapp/[email protected]
with:
target-branch: 'develop' # Branch which will receive the automatic cherry-picks
submodules-target-branch: 'develop' # If you want the action to fast-forward the submodules to a specific branch
pr-title-suffix: '🍒'

- name: Get the output
run:
echo "The created PR number is ${{
steps.hello.outputs.pr-number }}"
test-cherry-pick:
runs-on: ubuntu-latest
name: Test the cherry-pick action
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive #If you need to operate on submodules

- name: Cherry pick
id: cherry-pick
uses: wireapp/[email protected]
with:
# Branch which will receive the automatic cherry-picks
target-branch: 'develop'

# If you want the action to fast-forward the submodules to a specific branch
submodules-target-branch: 'develop'
pr-title-suffix: '🍒'

- name: Get the output
run:
echo "The created PR number is ${{
steps.hello.outputs.pr-number }}"
```

0 comments on commit de673b4

Please sign in to comment.