Skip to content

Commit 5a0cf95

Browse files
committed
Use env to read auto-merge inputs
1 parent 49a0c18 commit 5a0cf95

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

actions/auto-merge-prs/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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, {

0 commit comments

Comments
 (0)