Skip to content

Commit

Permalink
added test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Oct 16, 2023
1 parent a2988bc commit 3e00c02
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/review-bot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: Review PR
on:
pull_request:
workflow_run:
workflows:
- Review-Trigger
types:
- opened
- reopened
- synchronize
- review_requested
- review_request_removed
- ready_for_review
pull_request_review:
- completed

permissions:
contents: read
Expand All @@ -18,6 +14,11 @@ jobs:
review-approvals:
runs-on: ubuntu-latest
steps:
- name: Extract content of artifact
id: number
uses: Bullrich/extract-text-from-artifact@main
with:
artifact-name: pr_number
- name: Generate token
id: team_token
uses: tibdex/github-app-token@v1
Expand All @@ -27,8 +28,9 @@ jobs:
# !This must always point to main.
# Change it for the PRs but remember to change it back
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/review-bot@main
uses: paritytech/review-bot@test-branch
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
team-token: ${{ steps.team_token.outputs.token }}
checks-token: ${{ steps.team_token.outputs.token }}
pr-number: ${{ steps.number.outputs.content }}
31 changes: 31 additions & 0 deletions .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Review-Trigger

on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- review_requested
- review_request_removed
- ready_for_review
pull_request_review:

jobs:
trigger-review-bot:
runs-on: ubuntu-latest
name: trigger review bot
steps:
- name: Get PR number
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "Saving PR number: $PR_NUMBER"
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
- uses: actions/upload-artifact@v3
name: Save PR number
with:
name: pr_number
path: pr/
retention-days: 5

0 comments on commit 3e00c02

Please sign in to comment.