Skip to content

Commit

Permalink
Create action-restAPI.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Fabiana Campanari <[email protected]>
  • Loading branch information
FabianaCampanari committed Apr 9, 2024
1 parent cd47eac commit 8b7a068
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/action-restapi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create issue on commit

on: [ push ]

jobs:
create_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create issue using REST API
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/issues \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"title": "Automated issue for commit: ${{ github.sha }}",
"body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_."
}' \
--fail

0 comments on commit 8b7a068

Please sign in to comment.