ci remove formatting request workflow
This approach is too risky and insecure in its current implementation.
This commit is contained in:
48
.github/workflows/handle_format_request.yml
vendored
48
.github/workflows/handle_format_request.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: Reformat PR code
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-formatting:
|
|
||||||
continue-on-error: true
|
|
||||||
if: github.event.issue.user.login == 'embeddedt'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: khan/pull-request-comment-trigger@bb03972cc9f423111f3b5a23fcc9fd32741acabb
|
|
||||||
if: success()
|
|
||||||
id: check-comment
|
|
||||||
with:
|
|
||||||
trigger: '@lvgl-bot format'
|
|
||||||
prefix_only: true
|
|
||||||
reaction: rocket
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
- run: exit 1
|
|
||||||
if: steps.check-comment.outputs.triggered == 'false'
|
|
||||||
- name: Install astyle
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
|
||||||
sudo apt-get update -y -qq
|
|
||||||
sudo apt-get install astyle
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
if: success()
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
|
||||||
- name: Checkout PR
|
|
||||||
uses: dawidd6/action-checkout-pr@v1
|
|
||||||
if: success()
|
|
||||||
with:
|
|
||||||
pr: ${{github.event.issue.number}}
|
|
||||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
|
||||||
- name: Format code
|
|
||||||
run: python code-format.py
|
|
||||||
working-directory: scripts
|
|
||||||
- name: Commit changes
|
|
||||||
run: |
|
|
||||||
git config --global user.name 'lvgl-bot'
|
|
||||||
git config --global user.email 'lvgl-bot@users.noreply.github.com'
|
|
||||||
git config push.default upstream
|
|
||||||
git commit -am "style automatic formatting"
|
|
||||||
git push
|
|
||||||
Reference in New Issue
Block a user