cleanup some CI config stuff

This commit is contained in:
Norbert de Langen 2023-01-31 12:40:15 +01:00
parent 0e33781784
commit 75eeb6a9f1
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
3 changed files with 14 additions and 36 deletions

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: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
args: --dangerfile .ci/danger/dangerfile.ts args: --dangerfile scripts/dangerfile.ts

View File

@ -1,3 +1,4 @@
/* eslint-disable import/extensions */
import { fail, danger } from 'danger'; import { fail, danger } from 'danger';
import { execSync } from 'child_process'; import { execSync } from 'child_process';
@ -18,19 +19,26 @@ const Versions = {
const branchVersion = Versions.MINOR; const branchVersion = Versions.MINOR;
const checkRequiredLabels = labels => { const checkRequiredLabels = (labels: string[]) => {
const forbiddenLabels = flatten([ const forbiddenLabels = flatten([
'do not merge', 'ci: do not merge',
'in progress', 'in progress',
branchVersion !== Versions.MAJOR ? 'BREAKING CHANGE' : [], branchVersion !== Versions.MAJOR ? 'BREAKING CHANGE' : [],
branchVersion === Versions.PATCH ? 'feature request' : [], 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); const blockingLabels = intersection(forbiddenLabels, labels);
if (!isEmpty(blockingLabels)) { 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); const foundLabels = intersection(requiredLabels, labels);
@ -43,5 +51,5 @@ const checkRequiredLabels = labels => {
if (prLogConfig) { if (prLogConfig) {
const { labels } = danger.github.issue; const { labels } = danger.github.issue;
checkRequiredLabels(labels.map(l => l.name)); checkRequiredLabels(labels.map((l) => l.name));
} }