Conditional action is failing even though the syntax is correct

A repo has a yml file as follows:

name: Notify the Gchat Group for PRs from main repo
on:
  pull_request:
    types: [opened]
jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - name: Google Chat Notification
        if: github.repository == ‘1-Platform/op-components’
        uses: gautamkrishnar/google-chat-notification@master
        with:
          url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}

But this action is failing with The workflow is not valid. .github/workflows/notify-main.yml (Line: 10, Col: 13): Unexpected symbol: '‘1-Platform/op-components’'. Located at position 22 within expression: github.repository == ‘1-Platform/op-components’ error. Is this a bug?

Hi @gautamkrishnar,

This is due to the incorrect single quote in the if expression.
Please change to use:

if: github.repository == '1-Platform/op-components'   # fix the single quote

Thanks.

Thanks for the solution