-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.53 KB
/
issue.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
on:
issues:
types: [opened, edited]
jobs:
issue_open:
name: Issue opened or edited
if: ${{ !github.event.issue.pull_request }} && github.repository == 'raycast/extensions'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.RAYCAST_BOT_API_ACCESS_TOKEN }}
script: |
const { data } = await github.rest.repos.getContent({
mediaType: {
format: "raw",
},
owner: context.repo.owner,
repo: context.repo.repo,
path: "scripts/issue-bot.js",
});
const fn = Buffer.from(data.content, 'base64')
require('fs').writeFileSync('./issue-bot.js', fn)
const script = require('./issue-bot')
await script({
github,
context,
core
})
# - name: Notify Failure to Slack
# if: failure()
# uses: edge/simple-slack-notify@master
# with:
# color: "danger"
# text: ":no_entry_sign: ${env.GITHUB_WORKFLOW} has failed"
# fields: |
# [
# { "title": "Action logs:", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"},
# { "title": "Commit:", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/commit/${ env.GITHUB_SHA }"}
# ]
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_CHANNEL_WEBHOOK_URL }}