Merge pull request #20853 from storybookjs/norbert/ci-cleanup

Build: cleanup CI config
This commit is contained in:
Norbert de Langen 2023-01-31 13:24:22 +01:00 committed by GitHub
commit fa9df74f41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 82 additions and 251 deletions

View File

@ -1,83 +0,0 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: ['config:base', 'group:allNonMajor'],
prHourlyLimit: 1,
prConcurrentLimit: 1,
// Custom ignore paths to include our `examples/` directory
ignorePaths: [
'**/node_modules/**',
'**/bower_components/**',
'**/vendor/**',
'**/__tests__/**',
'**/test/**',
'**/tests/**',
'**/__fixtures__/**',
],
enabledManagers: ['npm'],
// Ignore release notes for non-breaking changes
fetchReleaseNotes: false,
// Always bump minor/patch to latest
rangeStrategy: 'bump',
major: {
// Replace ranges when there is a major
rangeStrategy: 'replace',
// Get us the release notes for breaking changes
fetchReleaseNotes: true,
},
packageRules: [
// Leave peerDependencies and engines alone
{
depTypeList: ['peerDependencies', 'engines'],
enabled: false,
},
// Handle patch updates under 0.1.0 as potentially breaking
// Workaround for https://github.com/renovatebot/renovate/issues/3588
{
managers: ['npm'],
matchCurrentVersion: '<0.1.0',
rangeStrategy: 'replace',
groupName: 'maybe breaking patch updates',
groupSlug: 'maybe-breaking-patch',
// Get us the release notes for potentially breaking changes
fetchReleaseNotes: true,
},
// Handle minor updates under 1.0.0 as potentially breaking
// Workaround for https://github.com/renovatebot/renovate/issues/3588
{
managers: ['npm'],
matchCurrentVersion: '<1.0.0 >=0.1.0',
minor: {
// FIXME: "rangeStrategy": "replace",
groupName: 'maybe breaking minor updates',
groupSlug: 'maybe-breaking-minor',
// Get us the release notes for potentially breaking changes
fetchReleaseNotes: true,
},
},
// Group Storybook's linter configs together
{
packageNames: ['@storybook/eslint-config-storybook', '@storybook/linter-config'],
groupName: 'storybook linting',
},
// Group Puppeteer packages together
{
packagePatterns: ['^puppeteer', '^@types/puppeteer'],
groupName: 'puppeteer',
},
// Group Acorn packages together
{
packagePatterns: ['^acorn'],
groupName: 'acorn',
},
// Group React packages together
{
packageNames: ['react', '@types/react', 'react-dom', '@types/react-dom'],
groupName: 'react',
},
],
// Simplifies the PR body
prBodyTemplate: '{{{table}}}{{{notes}}}{{{changelogs}}}',
prBodyColumns: ['Package', 'Change'],
// https://docs.renovatebot.com/merge-confidence/#enabling-and-disabling
ignorePresets: ['github>whitesource/merge-confidence:beta'],
}

30
.github/stale.yml vendored
View File

@ -1,30 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- linear
- todo
- ready
- 'in progress'
- 'do not merge'
- 'needs review'
- 'high priority'
- 'good first issue'
# Label to use when marking an issue as stale
staleLabel: inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hi everyone! Seems like there hasn't been much going on in this issue lately.
If there are still questions, comments, or bugs, please feel free to continue
the discussion. Unfortunately, we don't have time to get to every issue. We
are always open to contributions so please send us a pull request if you would
like to help. Inactive issues will be closed after 30 days. Thanks!
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Hey there, it's me again! I am going close this issue to help our maintainers
focus on the current development roadmap instead. If the issue mentioned is
still a concern, please open a new ticket and mention this old one. Cheers
and thanks for using Storybook!

View File

@ -17,4 +17,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --dangerfile .ci/danger/dangerfile.ts
args: --dangerfile scripts/dangerfile.ts

22
.gitignore vendored
View File

@ -27,3 +27,25 @@ test-results
# test-storybooks
test-storybooks/ember-cli/ember-output
test-storybooks/angular-cli/addon-jest.testresults.json
npm-shrinkwrap.json
.tern-port
.parcel-cache
coverage/
*.lerna_backup
/**/LICENSE
code/docs/public
package-lock.json
.nvmrc
storybook-static
.jest-test-results.json
*.jar
/false
/addons/docs/common/config-*
tsconfig.tsbuildinfo
code/test-results/
code/playwright-results/
code/playwright-report/
code/playwright/.cache/

113
.spelling
View File

@ -4,82 +4,57 @@
# one word per line, to define a file override use ' - filename'
# where filename is relative to this configuration file
addon
1
vue
svelte
webcomponents
aurelia
iframe
webpack
addons
styleguide-type
styleguides
angularjs
api
github
apollo
aurelia
bundlers
center
centered
cleanup
codemod
codemods
CommonJS
config
cra
PRs
cleanup
2
ES2016
prerelease
rc
npm
apollo
codemod
storyshots
graphql
lerna
eslint
js
CommonJS
IO
reflow
Node.js.
dialog
10
unisolated
3
13
Browserify
bundlers
2013
centered
center
GraphiQL
graphiql
url
javascript
storyshots'
storybook.js.org
CRNA
postmessage
websocket
dialog
ES2016
eslint
EventEmitter
codemods
jscodeshift
npm3
github
GraphiQL
graphql
HMR
Redux
storybook-ui
react-komposer
serializable
params
README.md
storybook.js.org
YuzuJS
setImmediate
Malte
Katić
Domenic
Kowal
Zakas
Gruber
julian
juliangruber.com
Schlueter
iframe
IO
javascript
js
jscodeshift
lerna
linkTo
Node.js
npm
onStory
params
postmessage
prerelease
PRs
rc
README.md
serializable
setOptions
setStories
onStory
storybook-ui
storybook.js.org
storyshots
storyshots'
styleguide-type
styleguides
svelte
unisolated
url
vue
webcomponents
webpack
websocket

20
.vscode/launch.json vendored
View File

@ -3,23 +3,5 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "cli html",
"cwd": "${workspaceFolder}/code/lib/cli/stories",
"runtimeArgs": [
"--inspect-brk",
"${workspaceFolder}/code/lib/cli/bin/index.js",
"init",
"--type",
"html"
],
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
}
]
"configurations": []
}

43
code/.gitignore vendored
View File

@ -1,43 +0,0 @@
node_modules
*.log
.idea
*.iml
*.sw*
!.swcrc
npm-shrinkwrap.json
dist
.tern-port
*.DS_Store
.cache
.parcel-cache
coverage/
*.lerna_backup
build
/**/LICENSE
docs/public
package-lock.json
.nvmrc
storybook-static
.jest-test-results.json
lib/*.jar
/false
/addons/docs/common/config-*
built-storybooks
.verdaccio-cache
tsconfig.tsbuildinfo
junit.xml
.next
/test-results/
/playwright-results/
/playwright-report/
/playwright/.cache/
# Yarn stuff
/**/.yarn/*
!/**/.yarn/releases
!/**/.yarn/plugins
!/**/.yarn/sdks
!/**/.yarn/versions
/**/.pnp.*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -1,3 +1,4 @@
/* eslint-disable import/extensions */
import { fail, danger } from 'danger';
import { execSync } from 'child_process';
@ -7,7 +8,7 @@ const flatten = require('lodash/flatten.js');
const intersection = require('lodash/intersection.js');
const isEmpty = require('lodash/isEmpty.js');
const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
const pkg = require('../code/package.json'); // eslint-disable-line import/newline-after-import
const prLogConfig = pkg['pr-log'];
const Versions = {
@ -18,19 +19,26 @@ const Versions = {
const branchVersion = Versions.MINOR;
const checkRequiredLabels = labels => {
const checkRequiredLabels = (labels: string[]) => {
const forbiddenLabels = flatten([
'do not merge',
'ci: do not merge',
'in progress',
branchVersion !== Versions.MAJOR ? 'BREAKING CHANGE' : [],
branchVersion === Versions.PATCH ? 'feature request' : [],
]);
const requiredLabels = flatten([prLogConfig.skipLabels || [], (prLogConfig.validLabels || []).map(keyVal => keyVal[0])]);
const requiredLabels = flatten([
prLogConfig.skipLabels || [],
(prLogConfig.validLabels || []).map((keyVal: string) => keyVal[0]),
]);
const blockingLabels = intersection(forbiddenLabels, labels);
if (!isEmpty(blockingLabels)) {
fail(`PR is marked with ${blockingLabels.map(label => `"${label}"`).join(', ')} label${blockingLabels.length > 1 ? 's' : ''}.`);
fail(
`PR is marked with ${blockingLabels.map((label: string) => `"${label}"`).join(', ')} label${
blockingLabels.length > 1 ? 's' : ''
}.`
);
}
const foundLabels = intersection(requiredLabels, labels);
@ -43,5 +51,5 @@ const checkRequiredLabels = labels => {
if (prLogConfig) {
const { labels } = danger.github.issue;
checkRequiredLabels(labels.map(l => l.name));
checkRequiredLabels(labels.map((l) => l.name));
}