[CT-1030] [Bug] backport workflow does not work for forks
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Current Behavior
Backport workflow [backport.yml](https://github.com/dbt-labs/dbt-core/tree/main/.github/workflows#:~:text=6%20months%20ago-,backport.yml,-Updating%20backport%20Action) does not work when the HEAD is a fork.
This is because the PR is running in the context of the fork and therefore the `GITHUB_TOKEN` has only read permission and cannot commit directly to branches / create branches within the dbt-labs org directly.
### Expected Behavior
Backports work on merged changes, regardless of where they start.
### Possible Solution
Not sure yet. Allowing commits from a fork is a security risk. If we could cherry pick the commit off main to backport that does not seem like a risk but how would we run the workflow in the right context?
At the end this should probably be an action or reusable workflow that lives in `dbt-labs/actions` so that we can reuse it across dbt-core and all adapters.
Contributor guide
Assessment
This issue has not been assessed yet.