Skip to content

Commit

Permalink
Try github-script action
Browse files Browse the repository at this point in the history
  • Loading branch information
pitag-ha committed Dec 5, 2023
1 parent b0327d1 commit 58eb9a5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/token_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Write a comment on a PR
- name: Write with GH API
run: |
curl -LsX POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -d '{"body":"Hello :)"}' "${{ github.event.pull_request.comments_url }}"
echo $?
- name: Try with github-script action
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 Second approach...'
})

0 comments on commit 58eb9a5

Please sign in to comment.