mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
This is a backport of PR #1062 as merged into main (987c029).
SUMMARY
Currently, the patchback bot creates PRs with cherry-picks of PRs that are labeled with stable-* label, and this PR (as any new PR) gets labeled as needs_triage. This is unnecessary as it intentional PR created by the CI job.
This pull request introduces a small update to ensure that the workflow only runs if the pull request is not created by the patchback[bot] user to avoid unnecessary labels.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
.github/workflows/label-new-prs.yaml
ADDITIONAL INFORMATION
No changelog is required
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
29 lines
721 B
YAML
29 lines
721 B
YAML
---
|
|
name: label new prs
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- converted_to_draft
|
|
- ready_for_review
|
|
|
|
jobs:
|
|
add_label:
|
|
if: github.actor != 'patchback[bot]'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- name: Add 'needs_triage' label if the pr is not a draft
|
|
uses: actions-ecosystem/action-add-labels@v1
|
|
if: github.event.pull_request.draft == false
|
|
with:
|
|
labels: needs_triage
|
|
|
|
- name: Remove 'needs_triage' label if the pr is a draft
|
|
uses: actions-ecosystem/action-remove-labels@v1
|
|
if: github.event.pull_request.draft == true
|
|
with:
|
|
labels: needs_triage
|