Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-1087) ci: enable source-git automation to validate reviews and ci results #415

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/pull-request-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
labels:
missing-review: pr/needs-review
changes-requested: pr/changes-requested
missing-failing-ci: pr/needs-ci
14 changes: 10 additions & 4 deletions .github/workflows/source-git-automation-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ 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:
pr-metadata: ${{ steps.metadata.outputs.metadata }}
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:
Expand All @@ -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 }}
18 changes: 17 additions & 1 deletion .github/workflows/source-git-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
32 changes: 0 additions & 32 deletions .mergify.yml

This file was deleted.