Skip to content
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

fix(frontend): 外部リソースインストールページでページキャッシュが効く問題を修正 #12105

Merged

Conversation

kakkokari-gtyih
Copy link
Contributor

What

Why

Fix https://misskey.systems/notes/9l3hsbky6b

Additional info (optional)

同一バージョンの修正なのでChangelog無し

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Oct 21, 2023
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (230b431) 79.24% compared to head (ab6ab1c) 79.24%.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #12105    +/-   ##
=========================================
  Coverage    79.24%   79.24%            
=========================================
  Files          939      940     +1     
  Lines       100405   100511   +106     
  Branches      8165     8155    -10     
=========================================
+ Hits         79565    79653    +88     
- Misses       20840    20858    +18     

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@syuilo
Copy link
Member

syuilo commented Oct 22, 2023

@taichanNE30 Report API Diff で Error: Resource not accessible by integration になるのって解決方法あるかしら?

@tai-cha
Copy link
Member

tai-cha commented Oct 22, 2023

@syuilo
うーん、おそらく必要なのはリポジトリの設定あたりでActionsに権限を渡すことなんですけれど設定の仕方間違えるとセキュリティのリスクにもつながるのでちょっと調べて返信したいです🙏

@kakkokari-gtyih
Copy link
Contributor Author

kakkokari-gtyih commented Oct 22, 2023

@/taichanNE30 Report API Diff で Error: Resource not accessible by integration になるのって解決方法あるかしら?

(このPR自体は問題ないかと)

@tai-cha
Copy link
Member

tai-cha commented Oct 22, 2023

(このPR自体は問題ないかと)

PRの内容自体に変更がないのは本当にそう()

@kakkokari-gtyih kakkokari-gtyih changed the title (fix) 外部リソースインストールページでページキャッシュが効く問題を修正 fix(frontend): 外部リソースインストールページでページキャッシュが効く問題を修正 Oct 22, 2023
@syuilo syuilo merged commit 796265f into misskey-dev:develop Oct 23, 2023
17 of 18 checks passed
@syuilo
Copy link
Member

syuilo commented Oct 23, 2023

🙏🏻

@tai-cha
Copy link
Member

tai-cha commented Oct 23, 2023

Report API Diff で Error: Resource not accessible by integration になるのって解決方法あるかしら?

@syuilo misskeyリポジトリの設定でActionsのページ(のGeneral)に行き「Allow GitHub Actions to create and approve pull requests」を設定することでおそらくそのエラーが解消して動くようになると思われます:pray:

@syuilo
Copy link
Member

syuilo commented Oct 23, 2023

Report API Diff で Error: Resource not accessible by integration になるのって解決方法あるかしら?

@syuilo misskeyリポジトリの設定でActionsのページ(のGeneral)に行き「Allow GitHub Actions to create and approve pull requests」を設定することでおそらくそのエラーが解消して動くようになると思われます🙏

すでにオンになってたわね

@tai-cha
Copy link
Member

tai-cha commented Oct 23, 2023

すでにオンになってたわね

🤯 …
ここでやるのもオフトピ感はすごいので場所かえたさはある

@anatawa12
Copy link
Member

anatawa12 commented Oct 23, 2023

on: pull_requestだとcontributorsからのpullreqではwriteアクセスが得られないのでon: pull_request_targetにするか、compare-diffon: workflow_runの別のactionにする必要があるとおもいます。

https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/

in the case of pull requests from forks which are always read.
(最適なソースを示せなかったためてきとうな公式文書の一部を引用)

多分pull_request_targetだとreviewしてない変更にsecrets / write accessを与えちゃうので、on: workflow_runを生やしてartifactsでやり取りするのが安全だと思います。
(misskey本体の一部にGITHUB_TOKENを使って悪いことするコードが書ける可能性がある)

@tai-cha
Copy link
Member

tai-cha commented Oct 23, 2023

多分pull_request_targetだとreviewしてない変更にsecrets / write accessを与えちゃうので

あるいはif条件を用いた実行も考えられるかも

別issueでやります

@tai-cha
Copy link
Member

tai-cha commented Oct 23, 2023

pull_req時に動かない問題はこちらへ

-> #12122

@kakkokari-gtyih kakkokari-gtyih deleted the fix-external-resource-pagecache branch October 24, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants