Skip to content

Code Insights iteration stats Slack bot #138

Code Insights iteration stats Slack bot

Code Insights iteration stats Slack bot #138

name: Code Insights iteration stats Slack bot
on:
schedule:
# Every Friday 5pm PST (Saturday 1am UTC)
- cron: 0 1 * * 6
jobs:
update-status:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Post iteration stats
uses: Amadevus/pwsh-script@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_PROJECTS_ACTION_TOKEN }}
SLACK_WEBHOOK_URI: ${{ secrets.INSIGHTS_ITERATION_SLACKBOT_WEBHOOK_URI }}
with:
script: |
$InformationPreference = 'Continue'
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 3.0
Install-Module PSGitHub -Force
Install-Module PSSlack -Force
if (!$env:GITHUB_TOKEN) {
throw "No GITHUB_TOKEN env var provided"
}
$PSDefaultParameterValues['*GitHub*:Token'] = ConvertTo-SecureString -String $env:GITHUB_TOKEN -AsPlainText -Force
./.github/workflows/post-iteration-stats.ps1 -ProjectNodeId 'MDExOlByb2plY3ROZXh0MzI3Ng==' -SlackChannel '#code-insights-planning' -SlackWebhookUri $env:SLACK_WEBHOOK_URI