fix formatting
This commit is contained in:
parent
1bd3c29aa6
commit
a66497202d
1 changed files with 13 additions and 21 deletions
34
.github/workflows/block-merge.yml
vendored
34
.github/workflows/block-merge.yml
vendored
|
@ -1,17 +1,18 @@
|
||||||
name: Check mergeability
|
name: Check mergeability
|
||||||
|
|
||||||
on: pull_request # run on pull request events
|
on: pull_request # run on pull request events
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# 1. Check if there are minor changesets
|
# 1. Check if there are minor changesets
|
||||||
# 2. Send PR disapproval
|
# 2. Send PR disapproval
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write # grant write permission on the pull-requests endpoint
|
# grant write permission on the pull-requests endpoint
|
||||||
|
pull-requests: write
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get changed files in the .changeset folder
|
- name: Get changed files in the .changeset folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v29
|
uses: tj-actions/changed-files@v29
|
||||||
|
@ -19,20 +20,11 @@ jobs:
|
||||||
files: |
|
files: |
|
||||||
.changeset/**/*.md
|
.changeset/**/*.md
|
||||||
|
|
||||||
- name: Check if any changesets contain minor changes
|
|
||||||
run: |
|
|
||||||
echo "Listing changed files..."
|
|
||||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
||||||
echo "$file was changed"
|
|
||||||
if grep -q "'astro': minor" "$file"; then
|
|
||||||
# Some Actions
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Send PR review
|
- name: Send PR review
|
||||||
run: | # approve the pull request
|
run: | # approve the pull request
|
||||||
curl --request POST \
|
curl --request POST \
|
||||||
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
||||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
||||||
--header 'content-type: application/json' \
|
--header 'content-type: application/json' \
|
||||||
-d '{"event":"REQUEST_CHANGES","body":"This PR is blocked because it contains a `minor` changeset. A reviewer will merge this at the next release if approved."}'
|
-d '{"event":"REQUEST_CHANGES","body":"This PR is blocked because it contains a `minor` changeset. A reviewer will merge this at the next release if approved."}'
|
||||||
|
|
Loading…
Add table
Reference in a new issue