reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
10.99k stars 7.51k forks source link

[GH workflow] update `analyze.yml` to avoid noisy notification #5801

Open awxiaoxian2020 opened 1 year ago

awxiaoxian2020 commented 1 year ago

When I merge PR into main branch, I always received the notification that the workflow failed like this.

I found the PR workflow is different from main branch. The latter doesn't generate comment indeed but it upload it and should be used the other workflow I metion at start.

The PR workflow:

pr

The main workflow:

main

awxiaoxian2020 commented 1 year ago

https://github.com/reactjs/react.dev/blob/b9af9f57232fd6c47f90cf39eef0fc12fa8743f6/.github/workflows/analyze_comment.yml#L13 It seems not including push and we shouldn't but how we handle with this noisy notification?

gaearon commented 1 year ago

If you have a fix in mind, please send it!

awxiaoxian2020 commented 1 year ago

@gaearon The point is that do we need analyze comment on main branch?

harish-sethuraman commented 1 year ago

Yea it is better to have. Because sometimes commits land directly into main rather than PR.

awxiaoxian2020 commented 1 year ago

Yea it is better to have. Because sometimes commits land directly into main rather than PR.

We can add conditions, I think. I will look into it on the weekend.