abhinav / git-spice

Manage stacked Git branches
https://abhinav.github.io/git-spice/
GNU General Public License v3.0
220 stars 11 forks source link

submit: Fix outdated PR templates with lower-case names #371

Closed abhinav closed 1 month ago

abhinav commented 1 month ago

We use the contents of possible PR template sites as the hash key for caching the PR templates we get from the remote. This was only looking at PULL_REQUEST_TEMPLATE.md names, even though pull_request_template.md is valid and accepted.

This change ensures that lower-cased versions are also considered when calculating the hash key.

To do this, we consider upper-case and lower-case variants of configured Forge template paths when calculating the cache key. Case-insensitivity of this path is considered part of the Forge contract because GitHub and GitLab both treat these as case-insensitive-ish. We can adjust this assumption if we add a forge that doesn't.

Resolves #369

abhinav commented 1 month ago

This change is part of the following stack:

Change managed by git-spice.

abhinav commented 1 month ago

Hm, actually I don't like this version. GitLab Merge Request templates are case-insensitive. I'll encode this in the contract.