2294de3d20
Resolves: RHEL-1087,RHEL-6213
96 lines
3.3 KiB
Diff
96 lines
3.3 KiB
Diff
From bf728def0c6eebdf8d2b8912232ba7806e109293 Mon Sep 17 00:00:00 2001
|
|
From: Jan Macku <jamacku@redhat.com>
|
|
Date: Fri, 20 Oct 2023 13:32:22 +0200
|
|
Subject: [PATCH] ci: enable source-git automation to validate reviews and ci
|
|
results
|
|
|
|
rhel-only
|
|
|
|
Related: RHEL-1087
|
|
---
|
|
.github/pull-request-validator.yml | 4 ++++
|
|
.../source-git-automation-on-demand.yml | 14 ++++++++++----
|
|
.github/workflows/source-git-automation.yml | 18 +++++++++++++++++-
|
|
3 files changed, 31 insertions(+), 5 deletions(-)
|
|
create mode 100644 .github/pull-request-validator.yml
|
|
|
|
diff --git a/.github/pull-request-validator.yml b/.github/pull-request-validator.yml
|
|
new file mode 100644
|
|
index 0000000000..4bb5bbec12
|
|
--- /dev/null
|
|
+++ b/.github/pull-request-validator.yml
|
|
@@ -0,0 +1,4 @@
|
|
+labels:
|
|
+ missing-review: pr/needs-review
|
|
+ changes-requested: pr/changes-requested
|
|
+ missing-failing-ci: pr/needs-ci
|
|
diff --git a/.github/workflows/source-git-automation-on-demand.yml b/.github/workflows/source-git-automation-on-demand.yml
|
|
index 92a65c8cc7..e70ba4857a 100644
|
|
--- a/.github/workflows/source-git-automation-on-demand.yml
|
|
+++ b/.github/workflows/source-git-automation-on-demand.yml
|
|
@@ -73,7 +73,8 @@ jobs:
|
|
with:
|
|
pr-number: ${{ matrix.pr-number }}
|
|
|
|
- - id: commit-linter
|
|
+ - if: ${{ !cancelled() }}
|
|
+ id: commit-linter
|
|
name: Lint Commits
|
|
uses: redhat-plumbers-in-action/advanced-commit-linter@v2
|
|
with:
|
|
@@ -81,7 +82,8 @@ jobs:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Validates tracker, changes tracker status, updates PR title
|
|
- - id: tracker-validator
|
|
+ - if: ${{ !cancelled() }}
|
|
+ id: tracker-validator
|
|
name: Validate Tracker
|
|
uses: redhat-plumbers-in-action/tracker-validator@v1
|
|
with:
|
|
@@ -95,5 +97,9 @@ jobs:
|
|
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- # TODO: merge PR if all checks passed
|
|
- # TODO: add comment to Tracker that PR was merged ...
|
|
+ - if: ${{ !cancelled() }}
|
|
+ name: Pull Request Validator
|
|
+ uses: redhat-plumbers-in-action/pull-request-validator@v1
|
|
+ with:
|
|
+ pr-metadata: ${{ steps.metadata.outputs.metadata }}
|
|
+ token: ${{ secrets.GITHUB_TOKEN }}
|
|
diff --git a/.github/workflows/source-git-automation.yml b/.github/workflows/source-git-automation.yml
|
|
index 16c6f83d77..9faaaca099 100644
|
|
--- a/.github/workflows/source-git-automation.yml
|
|
+++ b/.github/workflows/source-git-automation.yml
|
|
@@ -47,7 +47,8 @@ jobs:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Validates tracker, changes tracker status, updates PR title
|
|
- tracker-validation:
|
|
+ tracker-validator:
|
|
+ if: ${{ !cancelled() }}
|
|
needs: [ download-metadata, commit-linter ]
|
|
runs-on: ubuntu-latest
|
|
|
|
@@ -68,3 +69,18 @@ jobs:
|
|
jira-instance: https://issues.redhat.com
|
|
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
+
|
|
+ pull-request-validator:
|
|
+ needs: [ download-metadata ]
|
|
+ runs-on: ubuntu-latest
|
|
+
|
|
+ permissions:
|
|
+ checks: write
|
|
+ pull-requests: write
|
|
+
|
|
+ steps:
|
|
+ - name: Pull Request Validator
|
|
+ uses: redhat-plumbers-in-action/pull-request-validator@v1
|
|
+ with:
|
|
+ pr-metadata: ${{ needs.download-metadata.outputs.pr-metadata }}
|
|
+ token: ${{ secrets.GITHUB_TOKEN }}
|