Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Essem
Sharkey
Commits
a6e7c196
Commit
a6e7c196
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://github.com/misskey-dev/misskey
into develop
parents
a531b8ae
3510768f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/storybook.yml
+28
-8
28 additions, 8 deletions
.github/workflows/storybook.yml
packages/frontend/.storybook/preview.ts
+4
-1
4 additions, 1 deletion
packages/frontend/.storybook/preview.ts
with
32 additions
and
9 deletions
.github/workflows/storybook.yml
+
28
−
8
View file @
a6e7c196
...
...
@@ -2,8 +2,10 @@ name: Storybook
on
:
push
:
branches-ignore
:
-
l10n_develop
branches
:
-
master
-
develop
pull_request_target
:
jobs
:
build
:
...
...
@@ -17,6 +19,9 @@ jobs:
with
:
fetch-depth
:
0
submodules
:
true
-
name
:
Checkout HEAD
if
:
github.event_name == 'pull_request'
run
:
git checkout ${{ github.head_ref }}
-
name
:
Install pnpm
uses
:
pnpm/action-setup@v2
with
:
...
...
@@ -36,13 +41,13 @@ jobs:
-
name
:
Build storybook
run
:
pnpm --filter frontend build-storybook
-
name
:
Publish to Chromatic
if
:
github.ref == 'refs/heads/master'
if
:
github.event_name != 'pull_request' &&
github.ref == 'refs/heads/master'
run
:
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static
env
:
CHROMATIC_PROJECT_TOKEN
:
${{ secrets.CHROMATIC_PROJECT_TOKEN }}
-
name
:
Publish to Chromatic
if
:
github.ref != 'refs/heads/master'
id
:
chromatic
if
:
github.event_name != 'pull_request' &&
github.ref != 'refs/heads/master'
id
:
chromatic
_push
run
:
|
DIFF="${{ github.event.before }} HEAD"
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
...
...
@@ -55,16 +60,31 @@ jobs:
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static $(echo "$CHROMATIC_PARAMETER")
env
:
CHROMATIC_PROJECT_TOKEN
:
${{ secrets.CHROMATIC_PROJECT_TOKEN }}
-
name
:
Publish to Chromatic
if
:
github.event_name == 'pull_request'
id
:
chromatic_pull_request
run
:
|
DIFF="${{ github.base_ref }} HEAD"
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
DIFF="HEAD"
fi
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static $(echo "$CHROMATIC_PARAMETER")
env
:
CHROMATIC_PROJECT_TOKEN
:
${{ secrets.CHROMATIC_PROJECT_TOKEN }}
-
name
:
Notify that Chromatic will skip testing
uses
:
actions/github-script@v6.4.0
if
:
github.
ref != 'refs/heads/master' && github.ref != 'refs/heads/develop
' && steps.chromatic.outputs.skip == 'true'
if
:
github.
event_name == 'pull_request
' && steps.chromatic
_pull_request
.outputs.skip == 'true'
with
:
github-token
:
${{ secrets.GITHUB_TOKEN }}
script
:
|
github.rest.repos.createCommitComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: 'Chromatic will skip testing but you may still have to [review the changes on Chromatic](https://www.chromatic.com/pullrequests?appId=6428f7d7b962f0b79f97d6e4).'
})
-
name
:
Upload Artifacts
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/.storybook/preview.ts
+
4
−
1
View file @
a6e7c196
...
...
@@ -46,7 +46,10 @@ function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme
function
initLocalStorage
()
{
localStorage
.
clear
();
localStorage
.
setItem
(
'
account
'
,
JSON
.
stringify
(
userDetailed
()));
localStorage
.
setItem
(
'
account
'
,
JSON
.
stringify
({
...
userDetailed
(),
policies
:
{},
}));
localStorage
.
setItem
(
'
locale
'
,
JSON
.
stringify
(
locale
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment