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
name: [ChatGPT Generated] [Broken] Create Issue on Merged PR without Approvals | ||
on: | ||
pull_request: | ||
types: [closed] | ||
jobs: | ||
create_issue_on_merged_pr_without_approvals: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if PR was merged without approvals | ||
id: check_merged_without_approvals | ||
uses: tcardonne/github-approve-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
required-approvals: 1 | ||
check-pull-request: ${{ github.event.pull_request.number }} | ||
- name: Create Issue | ||
if: steps.check_merged_without_approvals.outputs.approvals_left > 0 | ||
uses: actions/create-issue@v1 | ||
with: | ||
title: Pull Request merged without approvals | ||
body: | | ||
The following Pull Request was merged without any approvals: | ||
- Title: ${{ github.event.pull_request.title }} | ||
- Number: ${{ github.event.pull_request.number }} | ||
- Author: ${{ github.event.pull_request.user.login }} | ||
- Merge Commit SHA: ${{ github.event.pull_request.merge_commit_sha }} | ||
labels: pull request, no-approvals |