File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Remove individual access to repos'
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ schedule :
7
+ - cron : ' 0 */1 * * *'
8
+
9
+ permissions : read-all
10
+ jobs :
11
+ remove-individual-access-to-repos :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ with :
16
+ path : community
17
+ - name : Generate github org configuration
18
+ env :
19
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20
+ run : |
21
+ set -e
22
+ set -o pipefail
23
+
24
+ community/org/generate_working_group_projects_sync_config.sh | jq -r .[].repositories[].name | grep -E "^cloudfoundry/" | while read -r repo; do
25
+ gh api "repos/${repo}/collaborators?affiliation=direct" | jq -r .[].login | while read -r user; do
26
+ echo "remove ${user} from ${repo}"
27
+ # gh api -X delete "/repos/${repo}/collaborators/${user}"
28
+ done
29
+ done
You can’t perform that action at this time.
0 commit comments