name: Update assigned issues in Webrecorder Projects

on:
  issues:
    types: [assigned]

env:
  todo: Todo
  done: Done!
  in_progress: Dev In Progress

jobs:
  update-project-column:
    runs-on: ubuntu-latest
    if: github.event_name == 'issues' && github.event.action == 'assigned'
    steps:
      - name: Move issue to ${{ env.todo }}
        uses: leonsteinhaeuser/project-beta-automations@v2.1.0
        with:
          gh_token: ${{ secrets.GHPROJECT_TOKEN }}
          organization: webrecorder
          project_id: 9
          resource_node_id: ${{ github.event.issue.node_id }}
          status_value: ${{ env.todo }} # Target status
