Added a Github action workflow which is supposed to work with main branch only but it gets trigger with other branches too

on:
  # push:
  #   branches-ignore: [master, main]
  #   # Remove the line above to run when pushing to master
  pull_request:
    branches:
      - main

this is supposed to run when a new PR is raised against main branch but it also gets triggered when PR is raised against other brach like develop

this should not work here

this is fine as it is expected - PR against master