Skip to content

Preserve action ref when changing action - #221

Merged
timtebeek merged 1 commit into
openrewrite:mainfrom
Wanbinyu:preserve-action-version
Aug 23, 2026
Merged

Preserve action ref when changing action#221
timtebeek merged 1 commit into
openrewrite:mainfrom
Wanbinyu:preserve-action-version

Conversation

@Wanbinyu

@Wanbinyu Wanbinyu commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Make ChangeAction.newVersion optional.
  • Preserve each matching action existing tag, branch, SHA, or absent ref when newVersion is omitted.
  • Keep explicit version replacement behavior unchanged.
  • Regenerate META-INF/rewrite/recipes.csv.

Testing

  • ./gradlew test --tests org.openrewrite.github.ChangeActionTest --rerun-tasks --stacktrace
  • ./gradlew recipeCsvGenerate recipeCsvValidate --stacktrace
  • ./gradlew clean build --stacktrace --no-daemon
  • git diff --check

The tests cover tag, branch, and SHA refs; declarative YAML activation without newVersion; composite action definitions; and preservation of inline comments and with: configuration.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Aug 23, 2026
@timtebeek
timtebeek merged commit cdfd79f into openrewrite:main Aug 23, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Replace action but leave configuration as is

2 participants