-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/446-gridlines
- Loading branch information
Showing
272 changed files
with
9,582 additions
and
2,005 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
name: Auto assign iOS PR reviewers | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, labeled] | ||
workflow_run: | ||
workflows: ["save-pr-number-for-ios-assign-reviewers"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
actions: read # for downloading artifacts | ||
contents: read # for accessing repository contents | ||
pull-requests: write # for assign reviewers | ||
|
||
jobs: | ||
reviewers-assign: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
timeout-minutes: 5 | ||
steps: | ||
- name: Download PR number | ||
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 | ||
with: | ||
name: pr_number | ||
path: ./ | ||
run_id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Read PR number | ||
id: pr_number | ||
run: echo "::set-output name=number::$(cat pr_number.txt)" | ||
|
||
- name: Assign reviewers | ||
uses: actions/github-script@v7 | ||
if: contains(github.event.pull_request.labels.*.name, 'type:iOS 🍎') && github.event.pull_request.draft == false | ||
run: gh pr edit "$NUMBER" --add-reviewer "$IOS_REVIEWERS" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
NUMBER: ${{ steps.pr_number.outputs.number }} | ||
IOS_REVIEWERS: ${{ vars.IOS_REVIEWERS }} | ||
with: | ||
script: | | ||
const { IOS_REVIEWERS } = process.env | ||
const author = context.payload.pull_request.user.login; | ||
const reviewers = IOS_REVIEWERS.split(',').filter(reviewer => reviewer !== author) | ||
await github.rest.pulls.requestReviewers({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
reviewers | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
name: 'PR Labeler' | ||
|
||
on: | ||
pull_request: | ||
workflow_run: | ||
workflows: ["save-pr-number-for-labeler"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
actions: read # for downloading artifacts | ||
contents: read # for accessing repository contents | ||
pull-requests: write # for add labels to pull requests | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Download PR number | ||
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 | ||
with: | ||
name: pr_number | ||
path: ./ | ||
run_id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Read PR number | ||
id: pr_number | ||
run: echo "::set-output name=number::$(cat pr_number.txt)" | ||
|
||
- name: Add label | ||
uses: actions/labeler@v5 | ||
with: | ||
configuration-path: .github/configs/labeler.yml | ||
run: gh pr edit "$NUMBER" --add-label "$LABELS" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
NUMBER: ${{ steps.pr_number.outputs.number }} | ||
LABELS: type:iOS 🍎 |
20 changes: 20 additions & 0 deletions
20
.github/workflows/save-pr-number-for-ios-assign-reviewers.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: save-pr-number-for-ios-assign-reviewers | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, labeled] | ||
|
||
jobs: | ||
save_pr_number: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'type:iOS 🍎') && github.event.pull_request.draft == false | ||
|
||
steps: | ||
- name: Save PR number | ||
run: | | ||
echo ${{ github.event.pull_request.number }} > pr_number.txt | ||
- name: Upload PR number | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pr_number | ||
path: pr_number.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: save-pr-number-for-labeler | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- app-ios/** | ||
|
||
jobs: | ||
save_pr_number: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Save PR number | ||
run: | | ||
echo ${{ github.event.pull_request.number }} > pr_number.txt | ||
- name: Upload PR number | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pr_number | ||
path: pr_number.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.