Git Product home page Git Product logo

Comments (4)

Duncanma avatar Duncanma commented on June 12, 2024 1

I think this is because GitHub is not doing an exact string match on issues... you can try the query yourself

https://github.com/ericswpark/ericswpark.github.io-comments/issues?q=is%3Aissue+in%3Atitle+%22https%3A%2F%2Fericswpark.com%2Fblog%2F2020%2F2020-10-11-porting-samsungs-galaxy-note-3-neo%2F%22+

To see that it returns the /ko/ ones when searching with the non-ko URL.

I'm also thinking it is treating the / and - characters as whitespace... so it is really searching for any issues with the following strings

https ericswpark.com blog 2020 2020 10 11 porting samsungs galaxy note 3 neo

To fix, I would say it might work if the URL was condensed into a single string both when the 1st issue is posted and when searching.... so something like "ericswpark.comblog202020201011portingsamsungsgalaxynote3neo"

Or a hash of the URL? a MD5 hash of the non-ko post would be 40b39569eb54ed2e4e29175a9343914c and the ko one would be cd1d3eb3b0ff6da17ac4c0924bda8ab7

from utterances.

ericswpark avatar ericswpark commented on June 12, 2024

I think the OP should have some hash of the URL that utterances could compare against, to make sure that the correct thread is fetched.

from utterances.

ericswpark avatar ericswpark commented on June 12, 2024

Think I found the relevant part:

export function loadIssueByTerm(term: string) {

This function should check if the response returned from the GitHub API has a matching title:

Screenshot 2023-12-11 at 3 47 50 PM

from utterances.

ericswpark avatar ericswpark commented on June 12, 2024

Actually, seems like title matching is already done:
Screenshot 2023-12-11 at 3 50 27 PM

if (result.title.toLowerCase().indexOf(term) !== -1) {

console.warn(`Issue search results do not contain an issue with title matching "${term}". Using first result.`);

So the only change needed is to not blindly return the first result when none of the titles match, and seems like there's already a PR open for that: #496

from utterances.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.