Smart changelog (#5205)
Added a smart Changelog : - Publish the Changelog before the app release. If the release has not yet been pushed to production, do not display it. - When the app release is done, make the Changelog available with the correct date. - If the Changelog writing is delayed because the release has already been made, publish it immediately. - Display everything locally to be able to iterate on the changelog and have a preview Added an endpoint for the Changelog --------- Co-authored-by: Ady Beraud <a.beraud96@gmail.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@ -63,8 +63,10 @@ const gabarito = Gabarito({
|
||||
export const Release = ({
|
||||
release,
|
||||
mdxReleaseContent,
|
||||
githubPublishedAt,
|
||||
}: {
|
||||
release: ReleaseNote;
|
||||
githubPublishedAt: string;
|
||||
mdxReleaseContent: ReactElement<any, string | JSXElementConstructor<any>>;
|
||||
}) => {
|
||||
return (
|
||||
@ -73,9 +75,9 @@ export const Release = ({
|
||||
<StyledVersion>
|
||||
<StyledRelease>{release.release}</StyledRelease>
|
||||
<StyledDate>
|
||||
{release.date.endsWith(new Date().getFullYear().toString())
|
||||
? release.date.slice(0, -5)
|
||||
: release.date}
|
||||
{githubPublishedAt.endsWith(new Date().getFullYear().toString())
|
||||
? githubPublishedAt.slice(0, -5)
|
||||
: githubPublishedAt}
|
||||
</StyledDate>
|
||||
</StyledVersion>
|
||||
<ArticleContent>{mdxReleaseContent}</ArticleContent>
|
||||
|
||||
Reference in New Issue
Block a user