File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,17 @@ runs:
2424 steps :
2525 - name : Check and merge eligible PRs
2626 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
27+ env :
28+ INPUT_LABEL_NAME : ${{ inputs.label-name }}
29+ INPUT_HOURS_OPEN : ${{ inputs.hours-open }}
30+ INPUT_MERGE_METHOD : ${{ inputs.merge-method }}
2731 with :
2832 github-token : ${{ inputs.github-token }}
2933 script : |
3034 const { owner, repo } = context.repo;
31- const labelName = core.getInput('label-name') ;
32- const hoursOpen = parseFloat(core.getInput('hours-open') );
33- const mergeMethod = core.getInput('merge-method') ;
35+ const labelName = process.env.INPUT_LABEL_NAME ;
36+ const hoursOpen = parseFloat(process.env.INPUT_HOURS_OPEN );
37+ const mergeMethod = process.env.INPUT_MERGE_METHOD ;
3438
3539 // Get all open PRs (with pagination)
3640 const pullRequests = await github.paginate(github.rest.pulls.list, {
7781 core.info(`❌ PR opened ${hoursSinceCreation.toFixed(2)} hours ago (needs ${hoursOpen}+ hours)`);
7882 continue;
7983 }
80- core.info(`✅ PR opened ${hoursSinceCreation.toFixed(2)} hours ago`);
84+ core.info(`✅ PR opened ${hoursSinceCreation.toFixed(2)} hours ago (over ${hoursOpen} hours) `);
8185
8286 // Check if the PR has a known valid merge commit SHA
8387 if (!pr.merge_commit_sha) {
You can’t perform that action at this time.
0 commit comments