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(pr): Fix clean phase before committing changes #597

Merged
merged 13 commits into from
Jan 8, 2025

Conversation

gounthar
Copy link
Collaborator

@gounthar gounthar commented Jan 8, 2025

Fixes #593.

Add a call to the 'clean' phase before committing changes in PluginModernizer.java.

  • Clean the target folder before committing changes if not in dry-run mode
  • Modify the start method to include the clean phase before committing, pushing, and opening a pull request

Testing done

java -jar plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT.jar run --plugins ab
sint-a3 --recipe SetupJenkinsfile

This created https://github.com/jenkinsci/absint-a3-plugin/pull/6/files .

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Fixes #75

Add support for customizing the pull request body using `jte` template files.

* Add a new method `hasBodyTemplate` in `TemplateUtils.java` to check for specific `jte` templates for the pull request body.
* Update the `renderPullRequestBody` method in `TemplateUtils.java` to use specific `jte` templates if available.
* Create a new `jte` template `pr-body-SetupJenkinsfile.jte` for customizing the pull request body for the `SetupJenkinsfile` recipe, including a detailed explanation of why this recipe is important.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
Implement a way to customize the pull request body
Fixes #78

Add a call to the 'clean' phase before committing changes in `PluginModernizer.java`.

* Clean the target folder before committing changes if not in dry-run mode
* Modify the `start` method to include the clean phase before committing, pushing, and opening a pull request

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/78?shareId=XXXX-XXXX-XXXX-XXXX).
@gounthar gounthar requested a review from jonesbusy as a code owner January 8, 2025 19:42
@jonesbusy jonesbusy merged commit a5c2da3 into jenkins-infra:main Jan 8, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creation of a pull request containing target classes
2 participants