Contribute agit support upstream to atlantis #114
Labels
No labels
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/governance#114
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://github.com/runatlantis/atlantis/issues/5140
Note: this is largely not possible due to forgejo's incomplete AGit support meaning that it is literally impossible to find the push ref from the PR, unless you scape the forgejo ui.
it turns out we don't actually need hte topic name, we just need
refs/pull/<PR_NUMBER>/head, i confirmed forgejo creates this for all PRsalso i saw in the logs that atlantis is already trying
git clone --branch refs/pull/<PR_NUMBER>/head, it's just thatgit clone --branchcan't resolve a non-refs/heads/*refbasically we have to replace
git clone --branch <ref>withgit init+git remote add origin <url>+git fetch origin refs/pull/<PR_NUMBER>/head+git checkout FETCH_HEAD, atlantis already has this logic inworking_dir.go(which it uses incloneNonPRRef/GithubAppEnabled)