Improve the GitHub workflow to prevent premature email notifications about missing labels. Previously, contributors without write permissions to the scylladb repo would receive immediate notification emails about missing required backport labels, even if they were in the process of adding them. This change introduces a 1-minute grace period before checking for required labels, giving contributors sufficient time to add necessary labels (like backport labels) to their pull requests before any warning notifications are sent. The delay makes the experience more user-friendly for non-maintainer contributors while maintaining the labeling requirements. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes scylladb/scylladb#23539
25 lines
621 B
YAML
25 lines
621 B
YAML
name: PR require backport label
|
|
on:
|
|
pull_request:
|
|
types: [opened, labeled, unlabeled, synchronize]
|
|
branches:
|
|
- master
|
|
- next
|
|
jobs:
|
|
label:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Wait for label to be added
|
|
run: sleep 1m
|
|
- uses: mheap/github-action-required-labels@v5
|
|
with:
|
|
mode: minimum
|
|
count: 1
|
|
labels: "backport/none\nbackport/\\d{4}\\.\\d+\nbackport/\\d+\\.\\d+"
|
|
use_regex: true
|
|
add_comment: false
|