Skip to content
name: [ChatGPT Generated] [Broken] Create Issue on Merged PR without Approvals

Check failure on line 1 in .github/workflows/codereview2-chatgpt-generated-broken.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/codereview2-chatgpt-generated-broken.yml

Invalid workflow file

You have an error in your yaml syntax
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