Skip to content

Forge silently fails if owner changes after initial forge pull, even with brand-new clone #239

@treyharris

Description

@treyharris

Steps to reproduce

(Requires access to multiple organizations or owner accounts):

  1. Connect Forge to a GitHub repo with issues and pull them into Forge
  2. Transfer ownership of the repo to a new owner (organization or user). You can now still visit https://github.com/${oldname}/${reponame}, but you will be redirected to https://github.com/${newname}/$reponame}.
  3. Quit and restart Emacs.
  4. Visit the repo again with magit-status and attempt to refresh issues.

Expected result:

The issues, as before, now migrated to the new owner.

Actual result:

Messages:

Pulling ${oldname}/${reponame}...done
Storing ${oldname}/${reponame}...done
Running hub fetch
Hub finished

No issues are displayed.

Continuing

  1. Move aside or delete the old repo.
  2. Clone the repo from its new name. Do not refer to the old name in any way.
  3. Run magit-status, then F y.

Expected results:

  • *Messages* referring to the new name
  • A list of issues

Actual results:

Messages:

Pulling ${oldname}/${reponame}...done
Storing ${oldname}/${reponame}...done
Running hub fetch
Hub finished

No issues are displayed.

Discussion

I traced execution enough to see that the issue is apparently in the SQLite file—this is where Forge is getting sent back to the old name, even when it’s never been referred to by Git in a given repo—and I suspect I could fix the issue by doing string-replacement in the SQL tables. But I have enough work in other repos in-flight that I’d prefer not to experiment.

Note that manually updating forge.remote for the repo does not make any difference here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions