Skip to content

Commit

Permalink
Allow set of MAX_PR_COUNT from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
agershman committed Sep 16, 2024
1 parent d1203c0 commit 227511a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ Also, the following general options are supported:

- `BASE_BRANCHES`: If provided, the action will be restricted in terms of base branches. Can be comma-separated list of simple branch names (i.e `main,dev`).

- `MAX_PR_COUNT`: If provided, will control how many GitHub pull requests are considered in a single run. The default is `10`.

You can configure the environment variables in the workflow file like this:

```yaml
Expand Down
2 changes: 1 addition & 1 deletion lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const RELEVANT_ACTIONS = [
];

// we'll only update a few PRs at once:
const MAX_PR_COUNT = 10;
const MAX_PR_COUNT = process.env.MAX_PR_COUNT || 10;

async function executeLocally(context, url) {
const { octokit } = context;
Expand Down

0 comments on commit 227511a

Please sign in to comment.