steamclock / coda-changelog

MIT License
0 stars 0 forks source link

Support release branches #11

Open AZielinsky95 opened 3 years ago

AZielinsky95 commented 3 years ago

We should be adding release/* branches to our workflow files and using the branch name to map to a table name.

jenncoop commented 2 years ago

Some projects that rely on release branches are not able to use the tool atm, so seems worth moving this one up a bit.

AZielinsky95 commented 2 years ago

Those projects can use the tool!

All that needs to be done is the workflow file needs to be specified to run on any release branch.

on:
  push:
    branches: [ release/* ]
jenncoop commented 2 years ago

Okay, wonderful! If there are multiple release branches at once, will all commits from each branch go into the single table?

AZielinsky95 commented 2 years ago

Yes they will. The way around that currently, is to have multiple workflow files for each release branch that passes in a specific table name.

One of the things we can do if we think it's worth it, is to parse the last path component of the release branch and look for a corresponding table. So a "release/1.5" branch would look for a table called "Release 1.5" if it couldn't find a table it would default to writing to Unreleased Changes table. (current default if no table name is provided)

jenncoop commented 2 years ago

@ssawchenko Do you ever have multiple release branches in flight at once?

ssawchenko commented 2 years ago

@ssawchenko Do you ever have multiple release branches in flight at once?

@jenncoop I don't think we have this too often in practice, but in theory I could see a case where we have a release in the works but we need to apply a hotfix/patch to the current release.

ie.

In this case we would have 2 release branches in flight at once, unless we treat patches/hotfixes differently. I'm not sure we've hashed out a naming scheme for patches yet, so it's possible simply adopting a patch/<number> naming scheme would solve this.

jenncoop commented 2 years ago

@AZielinsky95 IIRC, the Coda API doesn't allow us to create tables, so we'd need to manually add the table with the corresponding release name ahead of the release starting. Am I remembering that correctly?

AZielinsky95 commented 2 years ago

Yeah that's correct