Skip to content

Commit bac52df

Browse files
Merge pull request #204 from MonolithProjects/feat/api_runners_per_page
feat: per_page github api parameter
2 parents 588671f + cde8770 commit bac52df

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This is a copy from `defaults/main.yml`
6060
```yaml
6161
---
6262
# Runner user - user under which is the local runner service running
63-
runner_user: "{{ lookup('env','USER') }}"
63+
runner_user: "{{ lookup('env', 'USER') }}"
6464

6565
# Directory where the local runner will be installed
6666
runner_dir: /opt/actions-runner
@@ -72,22 +72,25 @@ runner_version: "latest"
7272
runner_state: "started"
7373

7474
# If found on the server, delete already existing runner service and install it again
75-
reinstall_runner: no
75+
reinstall_runner: false
7676

7777
# Do not show Ansible logs which may contain sensitive data (registration token)
78-
hide_sensitive_logs: yes
78+
hide_sensitive_logs: true
7979

8080
# GitHub address
8181
github_url: "https://github.com"
8282

8383
# GitHub API
8484
github_api_url: "https://api.github.com"
8585

86+
# Number of runners to list per page
87+
github_api_runners_per_page: 100
88+
8689
# Personal Access Token for your GitHub account
8790
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
8891

8992
# Is it the runner for organization or not?
90-
runner_org: no
93+
runner_org: false
9194

9295
# Labels to apply to the runner
9396
runner_labels: []

defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ github_url: "https://github.com"
2323
# GitHub API
2424
github_api_url: "https://api.github.com"
2525

26+
# Number of runners to list per page
27+
github_api_runners_per_page: 100
28+
2629
# Personal Access Token for your GitHub account
2730
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
2831

tasks/collect_info.yml

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
Authorization: "token {{ access_token }}"
3737
Accept: "application/vnd.github.v3+json"
3838
method: GET
39+
body_format: form-urlencoded
40+
body:
41+
per_page: "{{ github_api_runners_per_page }}"
3942
status_code: 200
4043
force_basic_auth: true
4144
register: registered_runners

0 commit comments

Comments
 (0)