.github/workflows: open issue when cycle is detected

This commit is contained in:
Piotr Wójcik 2021-06-29 19:58:45 +02:00 committed by Piotr
parent 399a844150
commit 4fc5144f8e

View file

@ -25,7 +25,7 @@ jobs:
# Upgrade again (in case there was a xbps update) # Upgrade again (in case there was a xbps update)
xbps-install -yu xbps-install -yu
# Install script dependencies # Install script dependencies
xbps-install -y python3-networkx xbps-install -y python3-networkx github-cli
- uses: actions/checkout@v1 - uses: actions/checkout@v1
with: with:
fetch-depth: 1 fetch-depth: 1
@ -34,4 +34,15 @@ jobs:
ln -s "$(pwd)" /hostrepo && ln -s "$(pwd)" /hostrepo &&
common/travis/set_mirror.sh && common/travis/set_mirror.sh &&
common/travis/prepare.sh common/travis/prepare.sh
- run: common/scripts/xbps-cycles.py - name: Find cycles and open issues
run: |
common/scripts/xbps-cycles.py | tee cycles
grep 'Cycle:' cycles | while read -r line; do
if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
printf "Issue on '%s' already exists.\n" "$line"
else
gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
fi
done
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}