diff --git a/.github/workflows/agenda.yaml b/.github/workflows/agenda.yaml index eecf2214df..eabcb37f7e 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -36,6 +36,10 @@ jobs: - name: Close old agenda issues run: gh issue list -l ${{ env.LABEL }} --author "app/github-actions" --json number,title | ConvertFrom-Json | Where-Object { $_.title -like "${{ env.TITLE_PREFIX }}*" -and ([datetime]::UtcNow - [datetime]::Parse([regex]::Replace($_.title.Replace("${{ env.TITLE_PREFIX }}", ""), "\([^)]+\)", ""))) -ge [timespan]::FromDays([int]::Parse("${{ env.POST_MEETING_CLOSE_DURATION_IN_DAYS }}"))} | ForEach-Object { gh issue close $_.number && gh issue unpin $_.number } shell: pwsh + + - name: Unpin any issue that was closed manually + run: gh issue list -l ${{ env.LABEL }} --author "app/github-actions" --json "number,title,isPinned" -s closed | ConvertFrom-Json | Where-Object { $_.isPinned -eq $true -and $_.title -like "${{ env.TITLE_PREFIX }}*" -and ([datetime]::UtcNow - [datetime]::Parse([regex]::Replace($_.title.Replace("${{ env.TITLE_PREFIX }}", ""), "\([^)]+\)", ""))) -ge [timespan]::FromDays([int]::Parse("${{ env.POST_MEETING_CLOSE_DURATION_IN_DAYS }}"))} | ForEach-Object { gh issue unpin $_.number } + shell: pwsh - name: Create agenda issue run: |