mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10092 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
# Copyright 2025 The Forgejo Authors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: requirements
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- edited
|
|
- opened
|
|
- synchronize
|
|
|
|
jobs:
|
|
merge-conditions:
|
|
if: >
|
|
vars.ROLE == 'forgejo-coding' && forge.event.pull_request.head.repo.full_name != 'forgejo-cascading-pr/forgejo'
|
|
runs-on: docker
|
|
container:
|
|
image: 'data.forgejo.org/oci/node:24-bookworm'
|
|
steps:
|
|
- name: Debug output
|
|
run: |
|
|
cat <<'EOF'
|
|
${{ toJSON(github) }}
|
|
EOF
|
|
- name: Missing test label
|
|
if: >
|
|
!(
|
|
contains(toJSON(forge.event.pull_request.labels), 'test/present')
|
|
|| contains(toJSON(forge.event.pull_request.labels), 'test/not-needed')
|
|
|| contains(toJSON(forge.event.pull_request.labels), 'test/manual')
|
|
)
|
|
run: |
|
|
echo "A team member must set the label to either 'present', 'not-needed' or 'manual'."
|
|
exit 1
|
|
- name: Missing manual test instructions
|
|
if: >
|
|
(
|
|
contains(toJSON(forge.event.pull_request.labels), 'test/manual')
|
|
&& !contains(toJSON(forge.event.pull_request.body), '# Test')
|
|
)
|
|
run: |
|
|
echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:"
|
|
echo "# Testing"
|
|
exit 1
|