Skip to content

fork-source-link-same-view broke forked repo branch to undefined #6302

Closed

Description

@01101sam

Description

The sameViewUrl.branch is undefined when calling await getDefaultBranch(forkedRepository) @ function getEquivalentURL.

This only happened in sub-fork repo (For example, a fork of a fork)

Please look at left bottom, the path of the branch is undefined

image

I've look through the code and found out that problem, but I'm still unsure if that's the right place that cause this undefined
image

How to replicate the issue + URL

Example url:

https://github.com/01101sam/node-proxy-agent
|- https://github.com/bonald/node-https-proxy-agent
  |- https://github.com/orihamama/node-https-proxy-agent

Reproduce: Just hold your mouse at the same place that last screenshot shows, and click.

  • Expected: You'll get redirected to parant repo.
  • Got: 404 path (But the repo is still there as shown in the following screenshot)

image

Extension version

23.2.5

Browser(s) used

Chrome

Activity

  1. changed the title [-][bug-fork] Branch of fork repo redirect is `undefined`[/-] [+]Fork] Branch of fork repo redirect is `undefined`[/+] on Feb 6, 2023
  2. changed the title [-]Fork] Branch of fork repo redirect is `undefined`[/-] [+][bug] Branch of fork repo redirect is `undefined`[/+] on Feb 6, 2023
  3. changed the title [-][bug] Branch of fork repo redirect is `undefined`[/-] [+]Branch of fork repo redirect is `undefined`[/+] on Feb 6, 2023
  4. fregante commented on Feb 6, 2023

    @fregante
  5. 01101sam commented on Feb 6, 2023

    @01101sam
    Author
  6. fregante commented on Feb 6, 2023

    @fregante
  7. 01101sam commented on Feb 6, 2023

    @01101sam
    Author
  8. fregante commented on Feb 6, 2023

    @fregante
    Member

    You're right, I must have broken this in #6265, which isn't yet available in my browser (Safari).

    I can reproduce in Chrome

  9. changed the title [-]Branch of fork repo redirect is `undefined`[/-] [+][fork-source-link-same-view](https://github.com/refined-github/refined-github/blob/main/source/features/fork-source-link-same-view.tsx) broke forked repo branch to `undefined`[/+] on Feb 6, 2023
  10. changed the title [-][fork-source-link-same-view](https://github.com/refined-github/refined-github/blob/main/source/features/fork-source-link-same-view.tsx) broke forked repo branch to `undefined`[/-] [+]`fork-source-link-same-view` broke forked repo branch to `undefined`[/+] on Feb 6, 2023
  11. added a commit that references this issue on Feb 7, 2023
  12. added
    disabled via hotfix
    on Feb 7, 2023
  13. removed
    disabled via hotfix
    on Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions