Update basic-support-info.yml

This commit is contained in:
Marco Ochse 2025-08-26 10:41:58 +02:00 committed by GitHub
parent b29cec6921
commit 67cf6c6a8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,23 +19,24 @@ jobs:
- name: Install jq - name: Install jq
run: sudo apt-get install jq -y run: sudo apt-get install jq -y
- name: Skip if issue has "investigate" label - name: Check for "investigate" label
id: skip_investigate id: skip_investigate
run: | run: |
LABELS=$(cat $GITHUB_EVENT_PATH | jq -r '.issue.labels[].name') LABELS=$(jq -r '.issue.labels[].name' "$GITHUB_EVENT_PATH")
for label in $LABELS; do for label in $LABELS; do
if [ "$label" = "investigate" ]; then if [ "$label" = "investigate" ]; then
echo "Issue has 'investigate' label. Skipping workflow." echo "skip=true" >> $GITHUB_ENV
exit 1 exit 0
fi fi
done done
echo "skip=false" >> $GITHUB_ENV
- name: Check issue for basic support info - name: Check issue for basic support info
if: env.skip != 'true'
id: check_issue id: check_issue
run: | run: |
REQUIRED_INFO=("What OS are you T-Pot running on?" "What is the version of the OS" "What T-Pot version are you currently using" "What architecture are you running on" "Review the \`~/install_tpot.log\`" "How long has your installation been running?" "Did you install upgrades, packages or use the update script?" "Did you modify any scripts or configs?" "Please provide a screenshot of \`htop\` and \`docker stats\`." "How much free disk space is available" "What is the current container status" "What is the status of the T-Pot service" "What ports are being occupied?") REQUIRED_INFO=("What OS are you T-Pot running on?" "What is the version of the OS" "What T-Pot version are you currently using" "What architecture are you running on" "Review the \`~/install_tpot.log\`" "How long has your installation been running?" "Did you install upgrades, packages or use the update script?" "Did you modify any scripts or configs?" "Please provide a screenshot of \`htop\` and \`docker stats\`." "How much free disk space is available" "What is the current container status" "What is the status of the T-Pot service" "What ports are being occupied?")
ISSUE_BODY=$(jq -r '.issue.body' "$GITHUB_EVENT_PATH")
ISSUE_BODY=$(cat $GITHUB_EVENT_PATH | jq -r '.issue.body')
MISSING_INFO=() MISSING_INFO=()
for info in "${REQUIRED_INFO[@]}"; do for info in "${REQUIRED_INFO[@]}"; do
@ -51,10 +52,9 @@ jobs:
fi fi
- name: Add "no basic support info" label if necessary - name: Add "no basic support info" label if necessary
if: env.missing == 'true' if: env.missing == 'true' && env.skip != 'true'
run: gh issue edit "$NUMBER" --add-label "$LABELS" run: gh issue edit "$NUMBER" --add-label "no basic support info"
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }} GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }} NUMBER: ${{ github.event.issue.number }}
LABELS: no basic support info