funktechno / git-kanban-enhanced-extension

chrome extension to add additional kanban project planning to git hosting: github.com, gitlab.com, gitea.io, bitbucket.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

better documentation for self hosted gitea

fazlerabbi37 opened this issue · comments

I just tried this extension on my gitea instance but I could not figure out the proper way to do this I guess.

Step to reproduce:

  1. Install the extension
  2. Open Git Kanban Options
  3. Put Url Host: domain.tld/gitea
  4. Select Git Host Type: to gitea.com
  5. Press add
  6. Reload repo page

Expected result: It should show the Kanban tab
Actual result: Not change on the repo page.

Would appreciate much if anyone shows me what am I doing wrong.

Which extension (id) are you using? Also do you have all domains enabled or have you only whitelisted a few?
Is this a root domain or a subdirectory path? e.g. gitea.mywebsite.com or mywebsite.com/gitea?

Also are issues enabled for the repo that you're using?

I can add documentation pictures on how to setup next week.

Sorry for the late reply.

Which extension (id) are you using?

This one is installed in my Chrome.

Also do you have all domains enabled or have you only whitelisted a few?

I am not sure what do you mean by whitelisting domain. Do you mean "Add a custom git platform:" on the "Git Kanban Option"?

Is this a root domain or a subdirectory path? e.g. gitea.mywebsite.com or mywebsite.com/gitea?

It is under a subdirectory so the path is domain.tld/gitea

Also are issues enabled for the repo that you're using?

Yes, issues are enabled on the repos I am trying.

I can add documentation pictures on how to setup next week.
See https://github.com/funktechno/git-kanban-enhanced-chrome-extension/wiki/Self-Hosting-Setup. I'll add pictures later.

So I just went ahead and tried the steps you suggested. I have one repo with 2 open issues. I removed the installed extension and started from the beginning following the wiki page.

  1. went to the Chrome webstore and installed the extension.
  2. as I said previously I am not sure what this step means so had to skip.
  3. opened the Git Kanban Option
  4. added domain.tld/gitea in Url Host field without protocol ie. http or https and selected Git Host Type: to gitea.com
  5. went to the repo and nothing changed.

However when I added domain.tld in Url Host field, it gave me an option to "Add Oauth Token:" not sure how to do that so removed the server.

I haven't tested this extension with a subdirectory self hosted website. There probably is some work that needs to be done with relative paths in this case. This is probably the issue on this. I would recommend running your gitea on a subdomain e.g. gitea.domain.tld or git.domain.tld for it to work or pull this repo and fix the change. I may work on a change on this in a few weeks to support this. I guess I could run gitea via docker and point my hosts file to it.

@lastlink thanks for the reply. 😄


would you mind clearing up the "White-list your git server domains in the extension tab for this extension." part from the step 2 of wiki? I am not sure what it means.

When you go to more tools > settings and click on details for this extension you can white list urls. I was unable to dynamically add urls with the permissions required. While this extension only runs if something is found on your list, I had to wildcard all urls to run additional checks. Like github.com. Github and bitbucket have some caching magic they do that causes the plugin to sometimes not run without a background history listener. I'm a fan of requiring only the minimum permissions needed that's why I recommend whitelisting, but it's not required.
whitelist picture

@fazlerabbi37 you're welcome to do a pull request to fix this.

I've updated the readme to be clearer on how to easily get setup with developing the extension locally.
I don't currently have a website to test a subdirectory against. You'd change this code snippet in src/content/inject.js

 if (ignoreList.indexOf(host) === -1 && currentOptions && currentOptions.length) {
        console.log(currentOptions);
        console.log(window.location.host);
        for (let i = 0; i < currentOptions.length; i++) {
          // if host = option url then set host to type
          if (currentOptions[i].url === window.location.host) {
            host = currentOptions[i].type;
          }
        }
      }

Probably checking if .url has a / and then use window.location.pathname in combination with host

closing this issue b/c documentation was updated. Will create a new issue to track the subdirectory support.