File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1313# by grep on github.com/ we would skip ssh ones
1414if git fetch -v 2>&1 | grep -q github.com/; then
1515 if ! git remote | grep -q " $ghremote " ; then
16- if ! GH_TOKEN=" $GITHUB_TOKEN " gh repo fork --remote --remote-name " $ghremote " ; then
16+ if GH_TOKEN=" $GITHUB_TOKEN " gh repo fork --remote --remote-name " $ghremote " ; then
17+ # disable actions in the fork -- we just want to provide contributions upstream
18+ fork_repo=$( git remote get-url " $ghremote " | sed -e ' s|.*github.com[:/]||' -e ' s|\.git$||' )
19+ GH_TOKEN=" $GITHUB_TOKEN " gh api -X PUT " repos/$fork_repo /actions/permissions" -F enabled=false || \
20+ echo " WARNING: Failed to disable actions on fork $fork_repo " >&2
21+ else
1722 echo " errored out, sleeping, trying to fetch"
1823 sleep 2
1924 git fetch " $ghremote "
You can’t perform that action at this time.
0 commit comments