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

Configurable Pull Request title template #52

Closed
lukaszwawrzyk opened this issue Jan 17, 2023 · 1 comment · Fixed by #166
Closed

Configurable Pull Request title template #52

lukaszwawrzyk opened this issue Jan 17, 2023 · 1 comment · Fixed by #166
Assignees
Labels
feature New feature or request
Milestone

Comments

@lukaszwawrzyk
Copy link
Collaborator

Similar issue to #44 but for PR titles. It also relates to grouping (#50), as grouped PRs will have custom titles, similarly default 1 change PR can have their title template.

@lukaszwawrzyk lukaszwawrzyk added the feature New feature or request label Jan 17, 2023
@lukaszwawrzyk lukaszwawrzyk added this to the go public milestone Mar 13, 2023
@lukaszwawrzyk
Copy link
Collaborator Author

lukaszwawrzyk commented Mar 13, 2023

For now we don't need to deal with PR grouping. Let's use config like

pull-requests:
  - title: "[maintenance] Updated {artifact} from {versionFrom} to {versionTo}"

Let's at least add "versionFrom", "versionTo", "group", "artifact", "name".
I am wondering how to handle syntax for group/artifact and name, as only maven kind will have group and artifact.

It would be good if users can say:
"Updated {group}/{artifact}"
"Updated {artifact}"
"Updated {name}"

Maybe we should also use generic mechanism of dependency filter in this area? It will play well with grouping later.

pull-requests:
  - title "Updated akka-deps"
    dependencies: "org.akka:*"
    group: true
  - title: "Updated {group}/{artifact} to {versionTo}"
    kind: maven
  - title: "Updated {name}"

Check how current UpdateRulesConfig and SearchPathConfig are organized and how they use the DependencyFilterApplier (better check UpdateRules part). I think we should just do it the same and ask PullRequestConfigResolver for each UpdateRequest, what title template should be used, then apply it and return as PullRequestSuggestion.
The template applier should pattern match and see if the Library is MavenCoordinates, if so, apply {group} and {artifact} if requested, if not and they were requested, it should be an error. For all other libraries, it should just substitute the common parameters.

@MarconZet MarconZet linked a pull request Mar 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants