Any other maintainer around to hold my hand while ...
# team-maintainers
f
Any other maintainer around to hold my hand while I run a gh command to tag all modules issues with a project? 😨
🙌 1
@Simon Pearce Can you jump on a quick call before I click the explode button?
s
2 minutes
f
👍
For future purposes, this is how you can tag all (or specific ones based on filters) issues with a project and add them thereby to the project board (use at own risk 😉 😞
Copy code
#!/bin/bash
# Script to add open issues from a GitHub repository to a GitHub project
# Usage: ./project_tag_to_issues.sh [repository] [project_number] [owner]

set -e  # Exit immediately if a command exits with a non-zero status

# Default values
REPO=${1:-"nf-core/modules"}  # Note: GitHub usernames are case-sensitive
PROJECT_NUMBER=${2:-"102"}
OWNER=${3:-"nf-core"}  # GitHub username of the project owner

echo "Adding open issues from $REPO to project number $PROJECT_NUMBER (owned by $OWNER)..."

# Get all open issues and add them to the project
for issue_number in $(gh issue list --repo "$REPO" --state open --limit 1000 --json number,title --jq '.[] | select(.title | contains("nf-test migration") | not) | .number'); do
  echo "Adding issue #$issue_number to project..."
  # Construct the issue URL and use --url flag
  ISSUE_URL="https://github.com/$REPO/issues/$issue_number"
  gh project item-add "$PROJECT_NUMBER" --owner "$OWNER" --url "$ISSUE_URL"
done

echo "Done! All open issues have been added to the project."
Also @Simon Pearce seems like ultimately our little "nf-test migration" filter didn't work sadpanda
🫣 1