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
feat: add per-permission-level repo exclusions to github-add-repo-permissions (#48)
Add REPO_ADMIN_EXCLUDE, REPO_MAINTAIN_EXCLUDE, REPO_PUSH_EXCLUDE, REPO_TRIAGE_EXCLUDE, and REPO_PULL_EXCLUDE variables to skip named repos for a given permission level only. Expose them as action.yml inputs, document in README, and add behavioral tests with a dedicated curl mock.
# Optional: restrict to repos whose names start with a given prefix
167
167
export REPO_NAME_FILTER="my-service-"
168
+
169
+
# Optional: skip specific repos for a given permission level (space-separated repo names)
170
+
export REPO_PULL_EXCLUDE="secret-repo internal-tools"# These repos won't get pull access
168
171
```
169
172
170
173
**Usage:**
@@ -178,6 +181,7 @@ cd org-admin/github-add-repo-permissions
178
181
- Filters to repositories whose names start with `REPO_NAME_FILTER` (all repos when unset)
179
182
- Grants permissions to specified teams based on permission level
180
183
- Supports multiple teams per permission level (space-separated)
184
+
- Skips repos listed in the matching `REPO_<LEVEL>_EXCLUDE` variable for that permission level only
181
185
- Processes all five GitHub permission levels: admin, maintain, push, triage, pull
182
186
- Includes 5-second delays between repos to avoid rate limits
183
187
@@ -190,6 +194,8 @@ cd org-admin/github-add-repo-permissions
190
194
191
195
> [!NOTE]
192
196
> At least one permission level must be set. Team slugs should be lowercase and hyphenated (e.g., "Platform Team" → `platform-team`).
197
+
>
198
+
> Each permission level has an optional exclusion list: `REPO_ADMIN_EXCLUDE`, `REPO_MAINTAIN_EXCLUDE`, `REPO_PUSH_EXCLUDE`, `REPO_TRIAGE_EXCLUDE`, and `REPO_PULL_EXCLUDE`. Each holds space-separated exact repo names that are skipped for that level only.
0 commit comments