mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
feat(pr): better default PR body columns
Drops References column and embeds links in Package column. Closes #3855
This commit is contained in:
parent
e30e03e263
commit
8fd03d7ae8
4 changed files with 42 additions and 26 deletions
|
@ -1759,7 +1759,7 @@ const options = [
|
|||
freeChoice: true,
|
||||
mergeable: true,
|
||||
default: {
|
||||
Package: '{{{depName}}}',
|
||||
Package: '{{{depNameLinked}}}',
|
||||
Type: '{{{depType}}}',
|
||||
Update: '{{{updateType}}}',
|
||||
'Current value': '{{{currentValue}}}',
|
||||
|
@ -1773,7 +1773,7 @@ const options = [
|
|||
name: 'prBodyColumns',
|
||||
description: 'List of columns to use in PR bodies',
|
||||
type: 'array',
|
||||
default: ['Package', 'Type', 'Update', 'Change', 'References'],
|
||||
default: ['Package', 'Type', 'Update', 'Change'],
|
||||
},
|
||||
{
|
||||
name: 'prBodyNotes',
|
||||
|
|
|
@ -41,6 +41,22 @@ async function getPrBody(config) {
|
|||
config.upgrades.forEach(upgrade => {
|
||||
/* eslint-disable no-param-reassign */
|
||||
const { homepage, sourceUrl, sourceDirectory, changelogUrl } = upgrade;
|
||||
let depNameLinked = upgrade.depName;
|
||||
const primaryLink = homepage || sourceUrl;
|
||||
if (primaryLink) {
|
||||
depNameLinked = `[${depNameLinked}](${primaryLink})`;
|
||||
}
|
||||
const otherLinks = [];
|
||||
if (homepage && sourceUrl) {
|
||||
otherLinks.push(`[source](${sourceUrl})`);
|
||||
}
|
||||
if (changelogUrl) {
|
||||
otherLinks.push(`[changelog](${changelogUrl})`);
|
||||
}
|
||||
if (otherLinks.length) {
|
||||
depNameLinked += ` (${otherLinks.join(', ')})`;
|
||||
}
|
||||
upgrade.depNameLinked = depNameLinked;
|
||||
const references = [];
|
||||
if (homepage) {
|
||||
references.push(`[homepage](${homepage})`);
|
||||
|
|
|
@ -1206,7 +1206,7 @@
|
|||
"description": "Table column definitions for use in PR tables",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"Package": "{{{depName}}}",
|
||||
"Package": "{{{depNameLinked}}}",
|
||||
"Type": "{{{depType}}}",
|
||||
"Update": "{{{updateType}}}",
|
||||
"Current value": "{{{currentValue}}}",
|
||||
|
@ -1219,7 +1219,7 @@
|
|||
"prBodyColumns": {
|
||||
"description": "List of columns to use in PR bodies",
|
||||
"type": "array",
|
||||
"default": ["Package", "Type", "Update", "Change", "References"]
|
||||
"default": ["Package", "Type", "Update", "Change"]
|
||||
},
|
||||
"prBodyNotes": {
|
||||
"description": "List of additional notes/templates to be included in the Pull Request bodies.",
|
||||
|
|
|
@ -30,9 +30,9 @@ Array [
|
|||
"Update dependency dummy to v1.1.0",
|
||||
"This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | pin | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | pin | \`1.0.0\` -> \`1.1.0\` |
|
||||
|
||||
:pushpin: **Important**: Renovate will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies.
|
||||
|
||||
|
@ -79,9 +79,9 @@ Array [
|
|||
"Update dependency dummy to v1.1.0",
|
||||
"This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` |
|
||||
|
||||
---
|
||||
|
||||
|
@ -126,13 +126,13 @@ Array [
|
|||
"Update dependency dummy to v1.1.0",
|
||||
"This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | lockFileMaintenance | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| a | | | \`zzzzzz\` -> \`aaaaaaa\` | |
|
||||
| b | | pin | \`some_old_value\` -> \`some_new_value\` | |
|
||||
| c | | | \`\` -> \`\` | |
|
||||
| d | | lockFileMaintenance | \`\` -> \`\` | |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | lockFileMaintenance | \`1.0.0\` -> \`1.1.0\` |
|
||||
| a | | | \`zzzzzz\` -> \`aaaaaaa\` |
|
||||
| b | | pin | \`some_old_value\` -> \`some_new_value\` |
|
||||
| c | | | \`\` -> \`\` |
|
||||
| d | | lockFileMaintenance | \`\` -> \`\` |
|
||||
|
||||
note 1
|
||||
|
||||
|
@ -190,9 +190,9 @@ Array [
|
|||
"Update dependency dummy to v1.1.0",
|
||||
"This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` |
|
||||
|
||||
---
|
||||
|
||||
|
@ -235,9 +235,9 @@ exports[`workers/pr ensurePr should return modified existing PR 1`] = `
|
|||
Object {
|
||||
"body": "This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` |
|
||||
|
||||
---
|
||||
|
||||
|
@ -277,9 +277,9 @@ exports[`workers/pr ensurePr should return modified existing PR title 1`] = `
|
|||
Object {
|
||||
"body": "This PR contains the following updates:
|
||||
|
||||
| Package | Type | Update | Change | References |
|
||||
|---|---|---|---|---|
|
||||
| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) |
|
||||
| Package | Type | Update | Change |
|
||||
|---|---|---|---|
|
||||
| [dummy](https://dummy.com) ([source](https://github.com/renovateapp/dummy), [changelog](https://github.com/renovateapp/dummy/changelog.md)) | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` |
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in a new issue