don't remove "needs info" label from maintainers

- replaces syntax to yaml multi-line, apparently `${{ ... }}` was only
  needed because the expression starts with a `!`
- since GitHub workflows only have literals for booleans, null, number,
  and string, we need to use `fromJSON` in order to create an array as
  per the example given in the docs for `contains`

see also:
- https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idif
- https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-matching-an-array-of-strings
- https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#literals

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
This commit is contained in:
Jyrki Gadinger 2025-02-26 16:59:01 +01:00
parent 02f183d28c
commit c13049db32

View File

@ -7,7 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ ! startsWith(github.event.comment.body, 'This issue has been marked as "needs info" 4 weeks ago.') && ! startsWith(github.event.comment.body, 'This bug report did not receive an update in the last 4 weeks.')}}
if: |
!startsWith(github.event.comment.body, 'This issue has been marked as "needs info" 4 weeks ago.') &&
!startsWith(github.event.comment.body, 'This bug report did not receive an update in the last 4 weeks.') &&
!contains(fromJSON('["camilasan", "claucambra", "mgallien", "nilsding", "Rello"]'), github.event.comment.user.login)
with:
labels: 'needs info'
github_token: ${{ secrets.GITHUB_TOKEN }}