You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: split logic into src/api.js, keep run() in index.js
Move all reusable functions (getConfig, getPRDetails, enqueue,
isMergeQueueEnabled, checkEligibility, processPR, getPRNumbers)
into src/api.js. src/index.js retains run() and the entry point
invocation. Also adds the branch input to action.yml, README, and
test coverage.
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,15 @@ jobs:
50
50
51
51
Then add the `enqueue-pullrequest` label to any PR you want automatically enqueued once it's ready.
52
52
53
+
To process only PRs from a specific branch (useful for `schedule` or `workflow_dispatch` triggers), set `branch`:
54
+
55
+
```yaml
56
+
- uses: waheedahmed/enqueue-pullrequest@v1
57
+
with:
58
+
github-token: ${{ secrets.GITHUB_TOKEN }}
59
+
branch: "feature/my-branch"
60
+
```
61
+
53
62
To enqueue **all** open PRs without requiring a label, set `label` to an empty string:
54
63
55
64
```yaml
@@ -66,6 +75,7 @@ To enqueue **all** open PRs without requiring a label, set `label` to an empty s
66
75
|-------|-------------|---------|
67
76
| `github-token` | Token for GitHub API access. Needs `pull-requests: write`. | `${{ github.token }}` |
68
77
| `label` | Label that triggers enqueuing. Set to `""` to process every open PR regardless of labels. | `enqueue-pullrequest` |
78
+
| `branch` | Head branch name to filter PRs by for broad events (`schedule`, `workflow_dispatch`, `push`, etc.). Leave empty to process all open PRs. | `""` |
0 commit comments