-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: release date #5960
feat: release date #5960
Conversation
Here is the result after adding timeStamp. @rarkins what so you think, should it be kept as show in the screenshot(in change column) or make a new column.(something like releaseTime). |
Shouldn’t be in any column by default yet and it needs to be formatted as discussed in the issue. |
Looks like you need to update your prettier version too btw |
Yeah I will format as we discussed to support all 4 formats, but just wanted to know the default placement of it in the PR(if not in any column of the table). |
No default placement yes but add it to allowed template fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Do not make any changes to the default tables
- Instead, add a new field to upgrades called
releaseDate
, which is formatted like below:
If less than a year old, make it like 01-Jan
.
If more than a year old, make it like 01-Jan-2018
@@ -1595,7 +1595,7 @@ const options: RenovateOptions[] = [ | |||
Update: '{{{updateType}}}', | |||
'Current value': '{{{currentValue}}}', | |||
'New value': '{{{newValue}}}', | |||
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}`', | |||
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}` {{{releaseTimestamp}}}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}` {{{releaseTimestamp}}}', | |
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}`', |
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@@ -14,6 +14,6 @@ export const defaultConfig = { | |||
versioning: npmVersioning.id, | |||
prBodyDefinitions: { | |||
Change: | |||
"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{fromVersion}}}/{{{toVersion}}})", | |||
"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{fromVersion}}}/{{{toVersion}}}) {{#if releaseTimestamp}}({{{releaseTimestamp}}}){{/if}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
@@ -44,6 +44,7 @@ export const allowedFields = { | |||
depType: 'The dependency type (if extracted - manager-dependent)', | |||
displayFrom: 'The current value, formatted for display', | |||
displayTo: 'The to value, formatted for display', | |||
releaseTimestamp: 'The release timeStamp of the newer version', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
releaseTimestamp: 'The release timeStamp of the newer version', | |
releaseDate: 'The release date of the newer version', |
@@ -11,7 +11,7 @@ import { getControls } from './controls'; | |||
import { BranchConfig } from '../../common'; | |||
|
|||
function massageUpdateMetadata(config: BranchConfig): void { | |||
config.upgrades.forEach((upgrade) => { | |||
config.upgrades.forEach(upgrade => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update your prettier
(e.g. run yarn
to update node_modules) and then run yarn prettier-fix
to revert this change.
@@ -13,6 +13,7 @@ function getTableDefinition(config: BranchConfig): TableDefinition[] { | |||
const value = config.prBodyDefinitions[header]; | |||
res.push({ header, value }); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert all changes in this file
Adds releaseTimeStamp to the PR updates table.
Closes #5822