name: Move new issues onto Issue triage board

on:
  issues:
    types: [opened]

jobs:
  add_to_triage:
    runs-on: ubuntu-latest
    if: >
      github.repository == 'element-hq/element-x-ios'
    steps:
        - uses: actions/add-to-project@main
          with:
              project-url: https://github.com/orgs/element-hq/projects/81
              github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}

  move_element_x_issues:
    name: ElementX issues to ElementX project board
    runs-on: ubuntu-latest
    # Skip in forks
    if: >
      github.repository == 'element-hq/element-x-ios'
    steps:
        - uses: actions/add-to-project@main
          with:
              project-url: https://github.com/orgs/element-hq/projects/43
              github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
