Skip to content

New issues template based on sample. #5

New issues template based on sample.

New issues template based on sample. #5

name: Generate Sample Issue Template
on:
push:
paths:
- '.github/CODEOWNERS'
pull_request:
paths:
- '.github/CODEOWNERS'
jobs:
generate-template:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip install pyyaml
- name: Run the generator script
run: python .github/ISSUE_TEMPLATE/sample_issue_generator.py
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .github/ISSUE_TEMPLATE/sample_issue.yml
git commit -m "Auto-generate sample issue template from CODEOWNERS" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref }}