mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-08-23 22:26:34 +00:00
Compare commits
52
Commits
8.1.0
...
rb/action-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9bf38fe28 | ||
|
|
4601c1fff4 | ||
|
|
e81c2d3930 | ||
|
|
9f33a603e4 | ||
|
|
7bae85c493 | ||
|
|
468bc2ef64 | ||
|
|
ab2d52b8d8 | ||
|
|
b079665364 | ||
|
|
baad393ea5 | ||
|
|
025cac8981 | ||
|
|
f229f4d663 | ||
|
|
e1cbe4ce6a | ||
|
|
5d91a5f7e0 | ||
|
|
c5ac49583e | ||
|
|
8ff5ad679a | ||
|
|
c09dac5262 | ||
|
|
7c675c6d43 | ||
|
|
6ef6193c3d | ||
|
|
bd9dd660ff | ||
|
|
559736b1b2 | ||
|
|
ef4b6ece30 | ||
|
|
34152609a8 | ||
|
|
0879f2a040 | ||
|
|
a2123293f7 | ||
|
|
a5acc96001 | ||
|
|
e2e7918d36 | ||
|
|
ad7b4f6aee | ||
|
|
581d06c194 | ||
|
|
729e7a9482 | ||
|
|
a63756a158 | ||
|
|
affab91d92 | ||
|
|
ccd707f230 | ||
|
|
68064da185 | ||
|
|
e4758dbc44 | ||
|
|
09209c9a7b | ||
|
|
8a7e691a8e | ||
|
|
3440296557 | ||
|
|
511157e010 | ||
|
|
195b9a8860 | ||
|
|
93b251d5c0 | ||
|
|
af840db564 | ||
|
|
909bc5e86b | ||
|
|
3cdaf143a4 | ||
|
|
693dbc5b25 | ||
|
|
b77672bde8 | ||
|
|
bf96f1dc89 | ||
|
|
40c6c569e0 | ||
|
|
fe014ac2bf | ||
|
|
5f87baaa56 | ||
|
|
35e7896553 | ||
|
|
1d7d3433c1 | ||
|
|
3a421412bb |
@@ -0,0 +1,98 @@
|
||||
name: Triage issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 16 * * Mon' # noon ET on Mondays
|
||||
issues:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
pull_request:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
jobs:
|
||||
notify:
|
||||
if: github.actor!= 'dependabot[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: octokit/request-action@v2.x
|
||||
id: need_triage
|
||||
with:
|
||||
route: GET /repos/FairwindsOps/${{ github.event.repository.name }}/issues?labels=triage
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Scheduled Reminders
|
||||
env:
|
||||
TITLES: ${{ join(fromJSON(steps.need_triage.outputs.data).*.title, ';') }}
|
||||
LINKS: ${{ join(fromJSON(steps.need_triage.outputs.data).*.html_url, ';') }}
|
||||
run: |
|
||||
echo "Scheduled reminder! ${TITLES}"
|
||||
IFS=';' read -r -a titles <<< "$TITLES"
|
||||
IFS=';' read -r -a links <<< "$LINKS"
|
||||
message=""
|
||||
for index in "${!links[@]}"; do
|
||||
title=${titles[$index]}
|
||||
link=${links[$index]}
|
||||
echo "$index $title $link"
|
||||
message="$message- <$link|$title>\\n"
|
||||
done
|
||||
echo "message: $message"
|
||||
echo '{
|
||||
"text": "Needs Triage",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "$message"
|
||||
}
|
||||
}
|
||||
]
|
||||
}' > body-template.json
|
||||
export message=$(echo "${message}" | sed 's/"//g')
|
||||
envsubst < body-template.json > body.json
|
||||
cat body.json
|
||||
curl -X POST "${{ secrets.SLACK_INCOMING_WEBHOOK }}" -H "Content-type: application/json" -d @./body.json
|
||||
|
||||
- name: Issue Notification
|
||||
if: github.event.issue.title != ''
|
||||
env:
|
||||
TITLE: "${{ github.event.issue.title }}"
|
||||
EVENT: github.event.pull_request.merged == true
|
||||
LINK: "https://github.com/FairwindsOps/${{ github.event.repository.name }}/pulls/${{ github.event.issue.number }}"
|
||||
run: |
|
||||
echo '{
|
||||
"text": "New Pull Request",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":issue: New Issue: <${LINK}|${TITLE}>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}' > body-template.json
|
||||
envsubst < body-template.json > body.json
|
||||
curl -X POST "${{ secrets.SLACK_INCOMING_WEBHOOK }}" -H "Content-type: application/json" -d @./body.json
|
||||
|
||||
- name: PR Notification
|
||||
if: github.event.pull_request.title != ''
|
||||
env:
|
||||
TITLE: "${{ github.event.pull_request.title }}"
|
||||
LINK: "https://github.com/FairwindsOps/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.number }}"
|
||||
run: |
|
||||
echo '{
|
||||
"text": "New Pull Request",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":pr: New Pull Request: <${LINK}|${TITLE}>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}' > body-template.json
|
||||
envsubst < body-template.json > body.json
|
||||
curl -X POST "${{ secrets.SLACK_INCOMING_WEBHOOK }}" -H "Content-type: application/json" -d @./body.json
|
||||
Reference in New Issue
Block a user