grafana/grafana-plugin-repository

Why the linter expects a README.md under src/ ?

Gowee opened this issue · 3 comments

Gowee commented

Hello.

I am trying to add my traceroute-map-panel plugin to the repository.

When running yarn lint, it shows error:
FAIL: ["Failed to fetch README.md from GitHub: NotFoundError: Couldn't load https://api.github.com/repos/Gowee/traceroute-map-panel/contents/src/README.md?ref=ae2c031292ff52495cac10f070e086be27a67406: 404 {\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/repos/contents/#get-contents\"}"] .

It seems to attempt to load src/README.md, which is 404 NOT FOUND, instead of README.md. Is it by design so that an additional README.md is required in src/ or I get something wrong?

I randomly check some plugins: the grafana-kdb-datasource-ws plugin has two README.md while the grafana-zabbix plugin has no src/README.md.

Here is my addition in repo.json:

{
  "id": "gowee-traceroute-map-panel",
  "type": "panel",
  "url": "https://github.com/Gowee/traceroute-map-panel",
  "versions": [
    {
      "version": "0.2.0",
      "commit": "ae2c031292ff52495cac10f070e086be27a67406",
      "url": "https://github.com/Gowee/traceroute-map-panel"
    }        
  ]
}

There shouldn't be any README in the src directory. Upon building, the README in the root directory gets moved into the dist directory. Are you still experiencing this?

Gowee commented

Thanks for replying.

The issue is a little too old for me to recall. I think the problem is, at that time, I expected Grafana to build the plugin automatically when it is submitted to the repository. So I did not let git track dist/ in the release commit, resulting in the error message above, which is a little hard to reason about, when linting.

I am closing the issue.

I understand. Thanks for taking the time to confirm!