Skip to content

fix: [#72] Create github pr labels if they do not exist yet #11

fix: [#72] Create github pr labels if they do not exist yet

fix: [#72] Create github pr labels if they do not exist yet #11

Workflow file for this run

name: python
"on": push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: testing
run: |
echo helloworld
gh label list --json name |\
jq -r '.[] | select(.name=="documentation") | .name'
check_label_exists() {
local label_name="$1"
LABEL_EXISTS=$(
gh label list --repo --json name |
jq -r '
.[] |
select(.name == "'"$label_name"'") |
.name
'
)
if [ -z "$LABEL_EXISTS" ]; then
return 1
fi
}
for label in documentation documentation2; do
echo $label
if ! check_label_exists "$LABEL_NAME" "$REPO"; then
echo "Label $LABEL_NAME does NOT exist"
fi
done
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/[email protected]
with:
python-version: 3.9.18
cache: "pip"
- name: Install PIP packages defined in requirements.txt
run: |
pip install -r requirements.txt
- name: Run tests
run: |
pytest --cov=main test.py --verbose --capture=no --cov-report term-missing