Skip to content

Commit

Permalink
fix(jte): Add custom PR title and body (jenkins-infra#626)
Browse files Browse the repository at this point in the history
* chore(deps): bump org.kohsuke.stapler:stapler

Bumps [org.kohsuke.stapler:stapler](https://github.com/jenkinsci/stapler) from 1940.v41211a_a_b_b_d8b_ to 1942.v708e07325402.
- [Release notes](https://github.com/jenkinsci/stapler/releases)
- [Changelog](https://github.com/jenkinsci/stapler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/stapler/commits)

---
updated-dependencies:
- dependency-name: org.kohsuke.stapler:stapler
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update README.md

* Cleanup and fix tests

* Add a Java ISO visitor for metadata collection

* Demonstrate test for jenkins-infra#580

* Reduce build time by skipping by default slow integration tests and
setup Junit 5 parallel

* WiP

* fix(jte): Use conventional commit for the title, and create a custom body for the Dependabot recipe.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Palash Chitnavis <[email protected]>
Co-authored-by: Valentin Delaye <[email protected]>
  • Loading branch information
4 people authored and nagu165 committed Jan 13, 2025
1 parent 735e143 commit fe23c86
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
20 changes: 20 additions & 0 deletions plugin-modernizer-core/src/main/jte/pr-body-AddCodeOwner.jte
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import io.jenkins.tools.pluginmodernizer.core.model.Plugin
@import io.jenkins.tools.pluginmodernizer.core.model.Recipe
@param Plugin plugin
@param Recipe recipe
Hello `${plugin.getName()}` developers! :wave:

This is an automated pull request created by the [Jenkins Plugin Modernizer](https://github.com/jenkins-infra/plugin-modernizer-tool) tool. The tool has applied the following recipes to modernize the plugin:
<details aria-label="Recipe details for ${recipe.getDisplayName()}">
<summary>${recipe.getDisplayName()}</summary>
<p><em>${recipe.getName()}</em></p>
<blockquote>${recipe.getDescription()}</blockquote>
</details>

## Why is this important?

To improve GitHub integration and enhance the [plugin health score](https://plugins.jenkins.io/${plugin.getName()}/healthscore/).

## Testing Done

None. We rely on GitHub checks of the pull request.
32 changes: 32 additions & 0 deletions plugin-modernizer-core/src/main/jte/pr-body-SetupDependabot.jte
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@import io.jenkins.tools.pluginmodernizer.core.model.Plugin
@import io.jenkins.tools.pluginmodernizer.core.model.Recipe
@param Plugin plugin
@param Recipe recipe
Hello `${plugin.getName()}` developers! :wave:

This is an automated pull request created by the [Jenkins Plugin Modernizer](https://github.com/jenkins-infra/plugin-modernizer-tool) tool. The tool has applied the following recipes to modernize the plugin:
<details aria-label="Recipe details for ${recipe.getDisplayName()}">
<summary>${recipe.getDisplayName()}</summary>
<p><em>${recipe.getName()}</em></p>
<blockquote>${recipe.getDescription()}</blockquote>
</details>

### Why Automate with Dependabot?

Managing dependencies can be a time-consuming and challenging task, especially when maintaining a Jenkins plugin. By automating this process with Dependabot, you open the door to a host of advantages:

- **Keep Pace with Innovation:** Dependabot ensures your plugin stays at the cutting edge by promptly updating it with the latest features and improvements from upstream libraries.

- **Strengthen Security:** Staying current with dependency updates is critical for security. Dependabot automatically flags and updates any vulnerable dependencies, helping to shield your plugin from potential exploits.

- **Save Time and Effort:** Spend less time managing dependencies and more time innovating. Dependabot automatically submits pull requests for new releases, allowing you to effortlessly review and integrate updates.

- **Enhance Compatibility and Stability:** Regular updates enhance both performance and compatibility with other plugins and the Jenkins core, ensuring a smooth experience for your users.

- **Focus on What Matters:** With Dependabot, you can concentrate on developing new features and fixing bugs, while it takes care of keeping everything up-to-date under the hood.

Setting up Dependabot exemplifies a proactive approach to modern software maintenance, aligning your plugin with the best practices in the industry. We invite you to test these updates and embrace a maintenance workflow that is efficient and secure.

Your insights and feedback are invaluable to us, and we'll be here to support you through this transition as needed.


5 changes: 5 additions & 0 deletions plugin-modernizer-core/src/main/jte/pr-title-AddCodeOwner.jte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import io.jenkins.tools.pluginmodernizer.core.model.Plugin
@import io.jenkins.tools.pluginmodernizer.core.model.Recipe
@param Plugin plugin
@param Recipe recipe
chore(github): Add CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
@import io.jenkins.tools.pluginmodernizer.core.model.Recipe
@param Plugin plugin
@param Recipe recipe
Automate dependency updates with Dependabot
chore(dependencies): Automate dependency updates with Dependabot
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public void testFriendlyPrTitleSetupDependabot() {
String result = TemplateUtils.renderPullRequestTitle(plugin, recipe);

// Assert
assertEquals("Automate dependency updates with Dependabot", result);
assertEquals("chore(dependencies): Automate dependency updates with Dependabot", result);
}

@Test
Expand Down

0 comments on commit fe23c86

Please sign in to comment.