sadpandajoe commented on code in PR #43251:
URL: https://github.com/apache/superset/pull/43251#discussion_r3818988427


##########
.github/workflows/frontend-bundle-size-nightly.yml:
##########
@@ -105,6 +105,14 @@ jobs:
           tool: customSmallerIsBetter
           output-file-path: bundle-size-summary.json
           external-data-json-path: bundle-size-history.json
+          # Required on a schedule event, unlike the PR-time job in
+          # superset-frontend.yml. The action reads the commit from
+          # payload.head_commit or payload.pull_request, and a scheduled run
+          # has neither, so without a token it throws "No commit information
+          # is found in payload" instead of recording a data point. With one
+          # it falls back to a repos.getCommit call, covered by the
+          # contents: read above.
+          github-token: ${{ secrets.GITHUB_TOKEN }}

Review Comment:
   This enables the API fallback for `workflow_dispatch`, but that fallback 
uses the dispatch ref while this job always builds `master`. Dispatching from 
another branch will record master’s bundle sizes under that branch’s commit. 
Could this also pass `ref: master`?
   
   ```suggestion
             github-token: ${{ secrets.GITHUB_TOKEN }}
             ref: master
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to