mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-19 08:51:10 +00:00
chore: do not impose merge requirements to cascading pull requests (#8936)
they are not meant to be merged and only exist for the purpose of verifying the CI passes should a pull request be merged in the Forgejo runner (or any other dependency for which such a cascading actions was defined). Refs https://code.forgejo.org/forgejo/runner/issues/881 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8936 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
cb4ffd29cf
commit
f6bc8f7cd7
1 changed files with 8 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2024 The Forgejo Authors
|
# Copyright 2025 The Forgejo Authors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: requirements
|
name: requirements
|
||||||
|
@ -13,7 +13,8 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
merge-conditions:
|
merge-conditions:
|
||||||
if: vars.ROLE == 'forgejo-coding'
|
if: >
|
||||||
|
vars.ROLE == 'forgejo-coding' && forge.event.pull_request.head.repo.full_name != 'forgejo-cascading-pr/forgejo'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: 'data.forgejo.org/oci/node:22-bookworm'
|
image: 'data.forgejo.org/oci/node:22-bookworm'
|
||||||
|
@ -26,9 +27,9 @@ jobs:
|
||||||
- name: Missing test label
|
- name: Missing test label
|
||||||
if: >
|
if: >
|
||||||
!(
|
!(
|
||||||
contains(toJSON(github.event.pull_request.labels), 'test/present')
|
contains(toJSON(forge.event.pull_request.labels), 'test/present')
|
||||||
|| contains(toJSON(github.event.pull_request.labels), 'test/not-needed')
|
|| contains(toJSON(forge.event.pull_request.labels), 'test/not-needed')
|
||||||
|| contains(toJSON(github.event.pull_request.labels), 'test/manual')
|
|| contains(toJSON(forge.event.pull_request.labels), 'test/manual')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
echo "A team member must set the label to either 'present', 'not-needed' or 'manual'."
|
echo "A team member must set the label to either 'present', 'not-needed' or 'manual'."
|
||||||
|
@ -36,8 +37,8 @@ jobs:
|
||||||
- name: Missing manual test instructions
|
- name: Missing manual test instructions
|
||||||
if: >
|
if: >
|
||||||
(
|
(
|
||||||
contains(toJSON(github.event.pull_request.labels), 'test/manual')
|
contains(toJSON(forge.event.pull_request.labels), 'test/manual')
|
||||||
&& !contains(toJSON(github.event.pull_request.body), '# Test')
|
&& !contains(toJSON(forge.event.pull_request.body), '# Test')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:"
|
echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue