Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "[OPTIONAL/DOESN'T BLOCK MERGING] Code Insights GitHub project automation" | |
| on: | |
| issues: | |
| # Note: labeled/milestoned is also triggered when opening a new issue with labels/milestone | |
| types: [closed, reopened, milestoned, labeled] | |
| pull_request: | |
| types: [opened, edited, synchronize, ready_for_review, converted_to_draft] | |
| jobs: | |
| update-project-items: | |
| name: Update project items | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Update project items | |
| 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/scripts/update-project-items.ps1 ` | |
| -ProjectNodeId 'MDExOlByb2plY3ROZXh0MzI3Ng==' ` | |
| -TeamLabel 'team/code-insights' ` | |
| -TeamIterationMilestonePattern '^Insights iteration' ` | |
| -SlackChannel '#code-insights-planning' ` | |
| -SlackWebhookUri $env:SLACK_WEBHOOK_URI |