fix(upgrade): renew a copied Forgejo PR form #223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/upgrade-forgejo-form"
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?
Why
Agent Foundry is a set of rules and skills for coding agents that a
repository adopts and later upgrades from this source. On a Forgejo
repository, adoption copies the pull request form agents write from,
.agents/templates/pull-request.md, to.forgejo/pull_request_template.md, which Forgejo's web UI offers aperson opening a pull request. An upgrade renewed the first file and
never the second, so after the source revised the form, as
b04e778did,agents filled the new form and people the old one, further apart with
each upgrade.
A validator check that the two files match was set aside, since it
would refuse a repository that keeps a Forgejo form of its own. A
symbolic link in place of the copy was set aside, since Forgejo's
handling of a linked template is unchecked.
Closes #221
What changed
Before, an agent upgrading a repository left its Forgejo form as
adoption copied it. Now, when the form and the template match on the
repository's main branch, the agent copies the merged template over the
form; when they differ, it asks the user, so a form the repository
changed on purpose is never overwritten unasked. A repository without
the form stays without it.
A repository whose two files already drifted meets that question at its
next upgrade. The change is one paragraph in step 3 of
UPGRADING.md.How to verify
Have Git and a clone of this repository, with
git fetch origin.The problem. The source changed both files between two of its
commits:
prints both as
M. Step 3 ofUPGRADING.mdmerges the first intoan adopting repository and leaves the root
.forgejo/in the source,and on
mainonly the one-time migration names the form:prints
origin/main:UPGRADING.md:1.The solution. The same search on the branch,
prints
origin/fix/upgrade-forgejo-form:UPGRADING.md:2, the secondbeing the new paragraph of step 3, to read at lines 41 to 46.
The checks of
docs/MAINTENANCE.mdpass on the tip. No test reads thesteps of
UPGRADING.md, so the change adds none.Not tried: an agent upgrading a trial repository adopted at
7182781tothis branch, which needs a session of its own outside the sandbox.
Considerations
The comparison is with the repository's own template rather than the
adopted commit's, which the issue proposed, so that a repository that
changed both files alike is still renewed.