Skip to content

Commit

Permalink
feat: test posting comments
Browse files Browse the repository at this point in the history
  • Loading branch information
f-hollow committed Dec 5, 2024
1 parent 1efdb65 commit 92250cb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pr-deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Deploy preview for PR

on:
pull_request:
types: [opened, synchronize, reopened]
# branches: [main]
push:
branches: [main]
# Allow manual runs from the Actions tab
workflow_dispatch:

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/pr-post-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
# Trigger the workflow on push or pull request
pull_request:
types: [opened, synchronize, reopened]

jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 Test comment in PR${{ github.event.pull_request.number }}!'
})

0 comments on commit 92250cb

Please sign in to comment.