Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update auto-draft workflow to use pull_request_target event
Currently the auto-draft workflow is failing on PRs submitted via forks [1] This is due to using the `pull_request` event, it overrides permissions in the workflow to read-only to protect you from leaking secrets etc. The `pull_request` event is required when building or running code from a pull request however this workflow is admin only so we should use `pull_request_target` `pull_request_target` allows you to use write permissions on PRs originating from forks, it allows this because it doesn't use the PR content, like a config repo operates so is safe to do so.[2] [1] https://github.com/openstack-k8s-operators/ci-framework/actions/runs/9017563161 [2] https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
- Loading branch information