Skip to content

[Feat]: Ability to sync towards most recent semver release #547

@JakobHavtorn

Description

@JakobHavtorn

Describe the feature

Always syncing to the most recent commit to main is useful, but in some release schedules, several PRs might be accumulated in main before a new release is made. Being able to sync towards the most recent release (as measured by semantic versioning) would be a good way to make the synchronisation even more structured. It would also be very useful to have an Action variable that contains the release notes for the release tag we are syncing against, so these notes can be included in the PR description.

Use Case

This would enable

  • Creating a sync PR only when the template repository gets a release. This ensures more "well-packaged" sync PRs.
  • Referring directly and transparently to which changes are included in an upstream merge via the release notes.

Proposed Solution

I imagine the implementation would consist of steps similar to:

  1. Check if this "release-based" sync is enabled.
  2. If not, do as before. If it is, proceed to 3.
  3. Retrieve all tags.
  4. Keep only tags that are semantic versions (e.g. *.*.*).
  5. Sort semvers alphanumerically in descending order.
  6. Select the first entry (most recent release).
  7. Run upstream merge towards this tag instead of main, as before.

Acknowledgements

  • I may be able to implement this feature request

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions