fix: give issue write permissions (#21)

* fix: give issue write permissions
* fix: try pull request target

---------

Signed-off-by: matttrach <matt.trachier@suse.com>
This commit is contained in:
Matt Trachier 2025-08-19 12:03:19 -05:00 committed by GitHub
parent 241b72e742
commit 6c1009008d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -1,14 +1,16 @@
name: MainIssue
# This workflow generates a "main" issue when a PR is created targeting main.
on:
pull_request:
branches:
- main
pull_request_target:
branches: [main]
types: [opened]
jobs:
generate-issue:
name: 'Create Main Issue'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v7
with:
@ -22,8 +24,8 @@ jobs:
owner: owner,
repo: repo,
title: pr.title,
body: "This is the main issue tracking #" + pr.number + "\n\n" +
"Please add labels indicating the release versions eg. 'version/v0'\n" +
body: "This is the main issue tracking #" + pr.number + " \n\n" +
"Please add labels indicating the release versions eg. 'version/v0' \n" +
"Please add comments for user issues which this issue addresses. \n" +
"Description copied from PR: \n" + pr.body,
labels: ['internal/main']