Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(create-prs-to-update-vcs-repositories): update only for versions whose format is X.Y.Z #320

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
addbbd4
fix(create-prs-to-update-vcs-repositories): fix as follows (see below)
sasakisasaki Sep 12, 2024
2d53671
fix(create-prs-to-update-vcs-repositories): fix a wrong match method
sasakisasaki Sep 12, 2024
5a9b967
fix(create-prs-to-update-vcs-repositories): fix README.md
sasakisasaki Sep 13, 2024
308248e
style(pre-commit): autofix
pre-commit-ci[bot] Sep 13, 2024
f3159da
fix(create-prs-to-update-vcs-repositories): specify language for fenc…
sasakisasaki Sep 13, 2024
5cb788f
Merge branch 'fix-regular-expression-pattern-for-semantic-versioning'…
sasakisasaki Sep 13, 2024
747664a
style(pre-commit): autofix
pre-commit-ci[bot] Sep 13, 2024
3a7feef
fix(create-prs-to-update-vcs-repositories): fix wrongly saved README.md
sasakisasaki Sep 13, 2024
261ab43
Merge branch 'fix-regular-expression-pattern-for-semantic-versioning'…
sasakisasaki Sep 13, 2024
298bcad
fix(create-prs-to-update-vcs-repositories): fix wrong plaintext annot…
sasakisasaki Sep 13, 2024
ee772cf
style(pre-commit): autofix
pre-commit-ci[bot] Sep 13, 2024
6694ec4
Update create-prs-to-update-vcs-repositories/README.md
sasakisasaki Sep 13, 2024
8fa10b0
fix(create-prs-to-update-vcs-repositories): fixes in semver (see below):
sasakisasaki Sep 24, 2024
d42ae1c
feat(create-prs-to-update-vcs-repositories): support release types (s…
sasakisasaki Sep 26, 2024
0ff74d0
Merge branch 'main' into fix-regular-expression-pattern-for-semantic-…
sasakisasaki Sep 26, 2024
ab681c8
fix(create-prs-to-update-vcs-repositories): ignore a word "devrelease…
sasakisasaki Sep 26, 2024
8692d06
Merge branch 'fix-regular-expression-pattern-for-semantic-versioning'…
sasakisasaki Sep 26, 2024
8158c26
fix(create-prs-to-update-vcs-repositories): apply missing updates
sasakisasaki Sep 26, 2024
4c33075
fix(create-prs-to-update-vcs-repositories): bug fix (see below):
sasakisasaki Sep 30, 2024
17f6251
fix(create-prs-to-update-vcs-repositories): cosmetic fix
sasakisasaki Oct 1, 2024
6fb60c8
fix(create-prs-to-update-vcs-repositories): fix code duplication
sasakisasaki Oct 1, 2024
55dd97b
fix(create-prs-to-update-vcs-repositories): cosmetic fix
sasakisasaki Oct 1, 2024
e653fae
fix(create-prs-to-update-vcs-repositories): fix a yamllint bug
sasakisasaki Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions create-prs-to-update-vcs-repositories/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
token: ${{ steps.generate-token.outputs.token }}
repo_name: autowarefoundation/autoware
parent_dir: .
targets: major minor
base_branch: main
new_branch_prefix: feat/update-
autoware_repos_file_name: autoware.repos
Expand All @@ -49,6 +50,7 @@ jobs:
| ------------------------ | -------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| token | true | | The token for pull requests. |
| repo_name | true | | The name of the repository to create pull requests. |
| targets | false | any | The target release types (choices: any, patch, minor, major). |
| parent_dir | false | . | The parent directory of the repository. |
| base_branch | false | main | The base branch to create pull requests. |
| new_branch_prefix | false | feat/update- | The prefix of the new branch name. The branch name will be `{new_branch_prefix}-{user_name}/{repository_name}/{new_version}`. |
Expand All @@ -58,3 +60,48 @@ jobs:
## Outputs

None.

## What kind of tags are handled?

- Monitors all vcs-imported repositories in the `autoware.repos` (if default) which have a version with regular expression pattern `r'\b(?<![^\s])\d+\.\d+\.\d+(?![-\w.+])\b'`.
- This pattern match/mismatches for the following examples:

```plaintext
"0.0.1", # match
"0.1.0", # match
"1.0.0", # match
"2.1.1", # match
"v0.0.1", # mismatch
"ros2-v0.0.4", # mismatch
"xxx-1.0.0-yyy", # mismatch
"v1.2.3-beta", # mismatch
"v1.0", # mismatch
"v2", # mismatch
"1.0.0-alpha+001", # mismatch
"v1.0.0-rc1+build.1", # mismatch
"2.0.0+build.1848", # mismatch
"2.0.1-alpha.1227", # mismatch
"1.0.0-alpha.beta", # mismatch
"ros_humble-v0.10.2" # mismatch
```

## What kind of version update is possible?

- If there is a new version with pattern matched in the vcs-imported repositories, create a PR for each repository, respectively.
- The valid/invalid version update cases are as follows:
- Valid ones (PR must be created):

```plaintext
0.0.1 => 0.0.2 # If `--target patch` or `--target any` is specified
1.1.1 => 1.2.1 # If `--target minor` or `--target any` is specified
2.4.3 => 3.0.0 # If `--target major` or `--target any` is specified
```

- Invalid ones (PR is not created):

```plaintext
main => 0.0.1
v0.0.1 => 0.0.2
xxx-0.0.1 => 0.0.9
0.0.1-rc1 => 0.0.2
```
5 changes: 5 additions & 0 deletions create-prs-to-update-vcs-repositories/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
description: Parent directory
required: false
default: ./
targets:
description: Target release types
required: false
default: any
base_branch:
description: Base branch
required: false
Expand Down Expand Up @@ -63,6 +67,7 @@ runs:
python ${GITHUB_ACTION_PATH}/create_prs_to_update_vcs_repositories.py \
--repo_name ${{ inputs.repo_name }} \
--parent_dir ${{ inputs.parent_dir }} \
--targets ${{ inputs.targets }} \
--base_branch ${{ inputs.base_branch }} \
--new_branch_prefix ${{ inputs.new_branch_prefix }} \
--autoware_repos_file_name ${{ inputs.autoware_repos_file_name }} \
Expand Down
Loading
Loading