Skip to content

Update package.json #629

Update package.json

Update package.json #629

Workflow file for this run

name: "Automatic PR comment: Try this PR!"
on:
pull_request_target:
types: [opened]
jobs:
write-comment:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: denoland/setup-deno@v1
with:
deno-version: "1.16.1"
- uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
require("fs").writeFileSync("context.json", JSON.stringify(context))
- name: Generate comment
id: generate-comment
run: |
deno eval '
const context = JSON.parse(await Deno.readTextFile("context.json"));
const body = `
## Try this Pull Request!
Open Julia and type:
\`\`\`jl
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="${context.payload.pull_request.head.repo.html_url}", rev="${context.payload.pull_request.head.ref}")
julia> using ${context.payload.repository.name.replace(/\.jl$/,"")}
\`\`\`
`
await Deno.writeTextFile("comment.txt", body);
'
- uses: nefrob/pr-description@v1.1.2
with:
content: "comment.txt"
contentIsFilePath: "true"
regex: "jkhsdkjhasdfkjhawkejfbawkehfkajshdfkjahsdf"
token: ${{ secrets.GITHUB_TOKEN }}