From 5c5cf35c8623730720a36af7dd1a2b8c36d07187 Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Fri, 3 May 2024 17:01:30 -0400 Subject: [PATCH 1/4] Add labels definition and filter to label workflow --- .github/labels.yml | 27 +++++++++++++++++++++++++++ .github/workflows/label.yaml | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 .github/labels.yml diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 00000000..bc6aeecf --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,27 @@ +- name: bug + description: Something isn't working + color: d42a34 + +- name: dependencies + description: Related with project dependencies + color: ffc0cb + +- name: documentation + description: Improvements or additions to documentation + color: 0677ba + +- name: enhancement + description: New features or code improvements + color: FFD827 + +- name: good first issue + description: Easy to solve for newcomers + color: 62ca50 + +- name: maintenance + description: Package and maintenance related + color: f78c37 + +- name: release + description: Anything related to an incoming release + color: ffffff diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 06f01fc0..2a4d4024 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -4,6 +4,9 @@ on: types: [opened, reopened, synchronize, edited, labeled] push: branches: [ main ] + paths: + - '../labels.yml' + concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 44e2ace7b278e73a8693ea11889224b8fd7f6dca Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Fri, 3 May 2024 17:05:45 -0400 Subject: [PATCH 2/4] Add label syncer --- .github/workflows/label.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 2a4d4024..47323a15 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -14,6 +14,15 @@ concurrency: jobs: + label-syncer: + name: Syncer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: micnncim/action-label-syncer@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + labeler: name: Set labels permissions: From f4f3a647c425208616bae9f97581c706e0121bf9 Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Fri, 3 May 2024 17:09:13 -0400 Subject: [PATCH 3/4] Add conditional --- .github/workflows/label.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 47323a15..8602f97c 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -29,6 +29,7 @@ jobs: contents: read pull-requests: write runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - name: Label based on changed files and branch name @@ -53,13 +54,13 @@ jobs: - [maintenance](https://github.com/ansys/openapi-common/pulls?q=label%3Amaintenance+) changelog-fragment: - name: "Create changelog fragment" - needs: [labeler] - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/doc-changelog@v6 - with: - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} \ No newline at end of file + name: "Create changelog fragment" + needs: [labeler] + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: ansys/actions/doc-changelog@v6 + with: + token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} From 24b846d8257790965cbe0b74fd3c3d4accb53d1a Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot Date: Fri, 3 May 2024 21:11:26 +0000 Subject: [PATCH 4/4] Adding changelog entry: 581.changed.md --- doc/changelog.d/581.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/581.changed.md diff --git a/doc/changelog.d/581.changed.md b/doc/changelog.d/581.changed.md new file mode 100644 index 00000000..37c0440d --- /dev/null +++ b/doc/changelog.d/581.changed.md @@ -0,0 +1 @@ +Fix labelling workflow \ No newline at end of file