Skip to content

Commit

Permalink
Merge pull request #4045 from traPtitech/feat/preview_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mehm8128 authored Aug 20, 2023
2 parents 042554e + 19a429f commit e5b8de9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/preview_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Comment preview environment URL

on:
pull_request:
types:
- opened

jobs:
comment:
name: Comment preview environment URL
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const prod = `https://${context.payload.pull_request.number}-prod.traq-preview.trapti.tech/`
const dev = `https://${context.payload.pull_request.number}-dev.traq-preview.trapti.tech/`
const msg = `
Preview (prod) → ${prod}
Preview (dev) → ${dev}
`
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: msg
});

0 comments on commit e5b8de9

Please sign in to comment.