AUTOUPDATE #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tb_dev_issue | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
tb_dev_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create issues | |
run: | | |
gh issue list --label "AUTO" --label "TB DEV" | sed "s/\t.*//g" > ___list | |
while read line; do | |
title=$(gh issue list --search "${line}" | sed "s/^.*OPEN\t//g" | sed "s/\t.*//g") | |
rtl_file=$(echo "${title}" | sed "s/_tb//g") | |
echo "${rtl_file}" | |
if [ ! -f "rtl/${rtl_file}.sv" ]; then | |
echo "File ${rtl_file} does not exists." | |
gh issue close ${line} --comment "RTL no longer exist" | |
fi | |
done < ___list | |
rm -rf ___list | |
for file in rtl/*.sv; do | |
folder=$(basename "${file}" | sed "s/\.sv/_tb/g") | |
title=$(echo "${folder}") | |
body=$(echo "Testbench Needed") | |
echo "Checking if issue '${title}' exists" | |
issue_exists=$(gh issue list --search "${title}" --json number -q '.[0].number') | |
if [ ! -d "tb/${folder}" ]; then | |
if [ -z "${issue_exists}" ]; then | |
echo "Creating issue '${title}'" | |
gh issue create --title "${title}" --body "${body}" --label "AUTO" --label "TB DEV" | |
else | |
echo "Issue '${title}' already exists" | |
fi | |
else | |
if [ ! -z "${issue_exists}" ]; then | |
echo "Auto-closing '${title}'" | |
gh issue close ${issue_exists} --comment "Auto-closing issue" | |
fi | |
fi | |
done | |
env: | |
GH_TOKEN: ${{ secrets.ISSUE_MAINTAIN }} |