aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2024-08-12 15:35:08 +0300
committerSyndamia <kamen@syndamia.com>2024-08-12 15:35:08 +0300
commit607da45edc362900c3285efc62dbb2e49a86caf4 (patch)
tree14dbea3415979970fe7382a933ef94adea502749 /.github/workflows
parent64ece5b3fbdd63a32ede21813e2fdb7dc6a186c0 (diff)
downloadpico-web-607da45edc362900c3285efc62dbb2e49a86caf4.tar
pico-web-607da45edc362900c3285efc62dbb2e49a86caf4.tar.gz
pico-web-607da45edc362900c3285efc62dbb2e49a86caf4.zip
feat(main-pr): Fixed pr editing and added commenting
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main-pr.yml20
1 files changed, 14 insertions, 6 deletions
diff --git a/.github/workflows/main-pr.yml b/.github/workflows/main-pr.yml
index d0ee4cc..d7293ec 100644
--- a/.github/workflows/main-pr.yml
+++ b/.github/workflows/main-pr.yml
@@ -1,6 +1,6 @@
-name: Check if pr to main is from dev
+name: Force to dev PRs not from dev to main
on:
- pull_request_target:
+ pull_request:
branches:
- 'main'
jobs:
@@ -10,8 +10,16 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- # - name: Add comment
- # uses: peter-evans/create-or-update-comment@v4
- # with:
+ - name: Add comment
+ uses: peter-evans/create-or-update-comment@v4
+ with:
+ token: ${{ secrets.TOKEN_GITHUB }}
+ issue-number: ${{ github.event.pull_request.number }}
+ body: |
+ Tried to create a pull request to `main` from a branch that isn't `dev`!
+ **Changing destinaton branch to `dev`!**
- name: Change base to dev
- run: gh pr edit --base 'dev'
+ run: gh pr edit $PR --base 'dev'
+ env:
+ GH_TOKEN: ${{ secrets.TOKEN_GITHUB }}
+ PR: ${{ github.event.pull_request.html_url }}