Files
containers/.github/workflows/comments.yml
Alejandro Gómez Morón 3d6918438d [bitnami/*] Fix autoassigning issues (#640)
* Automated PRs created by the bitnami-bot should be ignored by any workflow related to support activities.

Signed-off-by: Alejandro Gómez <morona@vmware.com>

* Fixing when the change is related to an issue

Signed-off-by: Alejandro Gómez <morona@vmware.com>
2022-07-25 11:20:23 +02:00

55 lines
2.1 KiB
YAML

name: '[Support] Organizing cards based on comments'
on:
issue_comment:
types:
- created
permissions:
repository-projects: write
issues: write
# To fix the concurrency when for example more than one label is added
concurrency:
group: ${{ github.run_id }}
cancel-in-progress: false
jobs:
comments_handler:
if: ${{ github.actor != 'bitnami-bot' && ((github.event.pull_request && (!contains(github.event.pull_request.labels.*.name, 'auto-merge'))) || github.event_name == 'issues') }}
runs-on: ubuntu-latest
steps:
- name: Repo checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Load .env file
uses: xom9ikk/dotenv@v1.0.2
with:
path: .github/workflows/
- name: Move into Pending
uses: peter-evans/create-or-update-project-card@v2
if: ${{ (!contains(github.event.issue.labels.*.name, 'bitnami')) && contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login) }}
with:
project-name: Support
column-name: Pending
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Move into In Progress
uses: peter-evans/create-or-update-project-card@v2
if: ${{ contains(github.event.issue.labels.*.name, 'in-progress') && (!contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login)) }}
with:
project-name: Support
column-name: In progress
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Move into Triage
uses: peter-evans/create-or-update-project-card@v2
if: ${{ ((contains(github.event.issue.labels.*.name, 'triage')) || (contains(github.event.issue.labels.*.name, 'solved'))) && (!contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login)) }}
with:
project-name: Support
column-name: Triage
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Label as triage back
# Only if commented when solved
if: ${{ contains(github.event.issue.labels.*.name, 'solved') }}
uses: andymckay/labeler@1.0.4
with:
add-labels: "triage"
remove-labels: "solved"