File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2222 pull_request_review :
2323 pull_request_review_comment :
2424 workflow_dispatch :
25+ inputs :
26+ pull_number :
27+ description : ' The Pull Request number to process manually'
28+ required : true
29+ type : string
2530
2631jobs :
2732 AddPullReady :
2833 permissions :
2934 checks : read
3035 pull-requests : write
36+ issues : write
37+ contents : read
3138 runs-on : ubuntu-latest
3239
3340 steps :
3441 - uses : actions/github-script@v7
3542 with :
3643 script : |
44+ const token_status = await github.rest.rateLimit.get();
45+ console.log("X-OAuth-Scopes:", token_status.headers['x-oauth-scopes']);
3746 const owner = "google"
3847 const repo = "maxtext"
3948 let pull_number = -1
40- if (context.payload.pull_request !== undefined) {
49+ if (context.payload.inputs && context.payload.inputs.pull_number) {
50+ pull_number = parseInt(context.payload.inputs.pull_number)
51+ console.log(`Manual trigger for PR #${pull_number}`)
52+ } else if (context.payload.pull_request !== undefined) {
4153 pull_number = context.payload.pull_request.number
4254 } else if (context.payload.workflow_run !== undefined) {
4355 if (context.payload.workflow_run.pull_requests.length === 0) {
You can’t perform that action at this time.
0 commit comments