Skip to content

[autofix] Format Python #1978

[autofix] Format Python

[autofix] Format Python #1978

Workflow file for this run

---
name: Labels
"on":
push:
branches:
- main
# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true
jobs:
generate-labels:
name: Generate extra labels
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install mpm
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
poetry install --no-interaction
- name: Generate labels
run: |
poetry run python ./.github/generate_labels.py
- name: Discard all local changes but the label definitions file
run: |
# Remove untracked directories and files.
git clean -fd
# Temporarily stash our target file.
git stash -- ./.github/labels-extra.json
# Reset all repository.
git checkout --force
# Restore modified file. Do not fail if no file has been stashed.
git stash pop || true
- uses: peter-evans/[email protected]
with:
assignees: ${{ github.actor }}
commit-message: "[github] Update extra labels."
title: "[github] Update extra labels"
body: >
<details><summary><code>Workflow metadata</code></summary>
> [Auto-generated on run `#${{ github.run_id }}`](${{ github.event.repository.html_url }}/actions/runs/${{
github.run_id }}) by `${{ github.job }}` job from [`labels.yaml`](${{ github.event.repository.html_url
}}/blob/${{ github.sha }}/.github/workflows/labels.yaml) workflow.
</details>
labels: "πŸ€– ci"
branch: update-labels
labels:
uses: kdeldycke/workflows/.github/workflows/[email protected]
needs: generate-labels
with:
extra-label-files: |
.github/labels-extra.json