Bulk Issues Please #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bulk Issues Please | |
on: | |
workflow_dispatch: | |
inputs: | |
topic: | |
type: choice | |
description: Target repositories with topic | |
required: true | |
options: | |
- app | |
- backend | |
- dev | |
- io | |
- module | |
- org | |
- platform | |
- runtime | |
- service | |
- test | |
title: | |
type: string | |
description: The title of the issues | |
required: true | |
body: | |
type: string | |
description: The body of the issues | |
required: false | |
jobs: | |
bulk-issues-please: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Create Issues | |
run: | | |
footer=":technologist: @${{ github.actor }} created this issue using <a href=\"https://github.com/hedia-team/.github/actions/workflows/issue-please.yml\">issue-please</a> :robot:" | |
body=$([ -n "${{ inputs.body }}" ] && echo "${{ inputs.body }}<hr>$footer" || echo "$footer") | |
echo "Creating the following issues:" | |
echo " " | |
urls=$(gh repo list hedia-team --limit 1000 --topic=${{ inputs.topic }} --no-archived --json=url --jq=".[] | .url") | |
for url in $urls | |
do | |
gh issue create --repo $url --title "${{ inputs.title }}" --body "$body" | |
done | |
echo " " | |
echo "Well done! You seem to have a lot on your plate now... Let's get to work!" | |
env: | |
GH_TOKEN: ${{ secrets.HEDIA_BOT_GITHUB_PAT }} |