# GitHub Projects lets you import from multiple repositories on creation, but the# built-in "Auto-add to project" workflow only supports a single repository (without# paying for more). This workflow replicates that functionality across all of our# repositories.## We also considered:# - a single workflow in a single repository (eg: bots) that checks all of# the repositories periodically: this wouldn't be realtime, and it would# be a lot of wasted action runs, 99% of which would do nothing at all# - driving a small Python helper from our webhook: this would be a nice# option, but most of our "GitHub administrativia" tasks are done via GitHub# workflows, so let's keep with the trendname: Add issues and bot PRs to Cockpit GitHub Projecton:issues:types:- openedpull_request_target:types:- labeledjobs:add-to-project:if: >-github.event_name == 'issues' ||(github.event_name == 'pull_request_target' &&contains(github.event.pull_request.labels.*.name, 'bot'))name: Add to projectenvironment: gh-projectruns-on: ubuntu-lateststeps:- uses: actions/add-to-project@v2with:project-url: https://github.com/orgs/cockpit-project/projects/10github-token: ${{ secrets.GH_PROJECT }}