Skip to content

Bug: repo name is being empty  #290

@a0m0rajab

Description

@a0m0rajab

Describe the bug

Sometimes the repo name is being empty in the bubble chat in the extension. this is happening due the repo name detector logic we have in this line of code:

const repoName = window.location.href.split("/").pop() ?? "";

This is happening when the URL has a slash at the end of it.

Steps to reproduce

  1. go to https://github.com/ahmadbilaldev/langui/
  2. check the network when you use the AI chat

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs

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