metrics: Achievements metrics shows (Unexpected Error)
Discussed in https://github.com/lowlighter/metrics/discussions/1478
<div type='discussions-op-text'>Originally posted by orsnaro July 11, 2023
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 22
- Comments: 17 (5 by maintainers)
Commits related to this issue
- turn off achievement plugin See https://github.com/lowlighter/metrics/issues/1479 — committed to deepmodeling/.github by njzjz a year ago
- Issue #1479 - Update index.mjs https://github.com/lowlighter/metrics/issues/1479 — committed to redlinejoes/metrics by redlinejoes a year ago
- Merge pull request #1 from redlinejoes:issue1479 Issue #1479 - Update index.mjs — committed to redlinejoes/metrics by redlinejoes a year ago
- Use redlinejoes fork until lowlighter/metrics#1479 is fixed — committed to Lakuna/Lakuna by Lakuna a year ago
- Use master branch for lowlighter/metrics Includes a fix for "unexpected error" in metrics: https://github.com/lowlighter/metrics/issues/1479 — committed to chriswells0/chriswells0 by chriswells0 a year ago
- Applying fix of #1479 (from lowlighter/metrics) @ `metrics.yml` Fixes the achievements "Unexpected Error" https://github.com/lowlighter/metrics/issues/1479 Downside: Instead of using a @stable I ne... — committed to Apocryphon-X/Apocryphon-X by Apocryphon-X a year ago
Yes, you can view the complete changes in https://github.com/TonyCrane/metrics/commit/46f327283ad2221c4d47963a3acd1096a4316d72.
But seems this repo haven’t updated for a few months, and my last pull request is ignored and closed by robot, so I haven’t open a PR for this (also I don’t think my solution is the best).
But I think we should repair this? So what do you think @lowlighter ?
@TonyCrane I tested your patch locally and it works as expected. I think the workaround is good enough for now so I merged it into master 👍
I guess now we could use the Search API directly by passing your query into it and be more reliable and faster, instead of using puppeteer as it could break again in a future redesign
GitHub have added a home page to GitHub Search, so metrics can’t get total repository/user/issue number from https://github.com/search.
And the query string can’t be empty, so maybe we can try searching
created:>2007, although this may be not exact, but at least it works.After this pr is merged, there is no new release, so
@latestis still an old version. If you want to use the repaired version, you need to use@master.I have tested and implemented your code, and it works as expected. Thank you for your contribution!
Thanks. But this means the problem is not on my side but with metrics? If yes, thank you for the fix in advance.
@X-itachi-X probably says to edit the http here
index.mjs : line 85