List pull request comments using go-github - goland

I am trying to retrieve list of comments for particular Pull Request using go-github.
I am interested in comments listed in the section Conversation not the review comments.
I tried to use PullRequests.ListComments, but it returns review comments
PullRequests.ListComments(ctx, ghOrgName, ghRepoName, *value.PullRequest.Number, &github.PullRequestListCommentsOptions{})
I didnt find suitable function in the documentation
Thanks in advance

Related

How to get comments by instanceId from the COMMENTS table in Activiti 5.22.0?

I am trying to get the comments associated with a Process Instance.
I thought these comments were being populated into the ACT_HI_COMMENT
table, but they are found in the COMMENTS table instead, so
I am not able to get them using taskService.getProcessInstanceComments
nor the
historyService.createProcessInstanceHistoryLogQuery(processInstanceService).includeComments().singleResult()
Does anyone know which is the correct service call to get this records
in Activiti 5.22.0 / Alfresco APS 1.9.0?
Thanks for your help!
I just found that this can be done by using:
com.activiti.service.runtime.CommentService
Like this:
commentService.getCommentsForProcessInstance(instanceId, true);

Reading Issue Fields via Workfront-API

Please tell me how to read Issue Fields like resolveProjectID & resolveTaskID:
****.workfront.com/attask/api/OPTASK/search?id=5bf801f101b144a12aabb51f2c068caa
returns:
{"data":
[{"ID":"5bf801f101b144a12aabb51f2c068caa",
"name":"test-dev-issue","objCode":"OPTASK",
"plannedCompletionDate":"2018-11-27T00:00:00:000+0200",
"status":"NEW",
"primaryAssignment":null}]
}
According to the API-Explorer guide (https://support.workfront.com/hc/en-us/articles/220633507-API-Explorer), resolveProjectID & resolveTaskID should be located within OPTASK fields. I couldn't find anything helpful yet within their documentation.
Thank you!
The search you're executing will work, but if you know the ID of the record you're retrieving then you should call it directly (/api/v9.0/OPTASK/5bf801f101b144a12aabb51f2c068caa).
The return value is, by default, a small set of fields providing some basic data. If you want more fields, add a parameter (fields=).

URL format for Google News RSS feed

Google deprecated the old RSS feed URL format December 1st 2017 (deprecation notice), in addition to that they dropped the button in the Google News interface to generate a RSS URL (news mentioning this change).
This means that there is no public or documented method of generating a new RSS link. The only documentation they have is out of date since they changed the interface.
What is the new format for generating a RSS feed for a Google News topic?
Found an up-to-date library (1) that uses Google News RSS.
The URL new format seems to be:
Top news:
https://news.google.com/news/rss
By major topic:
https://news.google.com/news/rss/headlines/section/topic/{topic}
Where {topic} is one of the following values: WORLD NATION BUSINESS TECHNOLOGY ENTERTAINMENT SPORTS SCIENCE HEALTH
By any/custom topic:
Once at https://news.google.com, browse to the desired topic, for example this. Identify the topic ID in its URL, e.g. CAAqIQgKIhtDQkFTRGdvSUwyMHZNR056T1hFU0FtVnVLQUFQAQ, and use the format:
https://news.google.com/rss/topics/{id}?hl={lang}
In the format above, essentially rss/ is added after https://news.google.com/.
By geolocation:
https://news.google.com/news/rss/headlines/section/geo/{location}
Not sure about the formatting for the {location} parameter
By search query:
New link: https://news.google.com/rss/search?q={query}
Old link: https://news.google.com/news/rss/search/section/q/{query}
Where the {query} parameter is a free text search
Specifying country and language:
For example if you wish to have news in Swedish and located from Swedish sources, add the following query string to the URL to change country and language to sv-SE:
?hl=sv&gl=SE&ceid=SE%3Asv
Requests to the Geo endpoint seem to be working again.
e.g. https://news.google.com/news/rss/headlines/section/geo/{place_name}
Also, if you use the non-geo search, you can specify a 7-day window by adding +when:7d to your search.
e.g. https://news.google.com/rss/search?q={key_words}+when:7d
This options isn't valid anymore:
https://news.google.com/news/rss/headlines/section/topic/{topic}
produces Error 500.
This seems to work:
https://news.google.com/news?cf=all&hl=en&pz=1&ned=us&q=astronomy&output=rss
The Geolocation mentioned above still works too. You can also specify city and state:
https://news.google.com/news/rss/headlines/section/geo/DenverCo
Updated Google RSS News Feed
You can try this as well.
https://news.google.com/rss?hl=en-NG&gl=NG&ceid=NG:en
I was also looking for documentation. This is the best article I found.
https://blog.newscatcherapi.com/google-news-rss/
If using search you can also specify not to include articles with a certain keyword.
e.g. if I wanted to search for pages that contain the word "apple" with out the word "pie" you can specify
q=apple%20-pie
or in full
https://news.google.com/rss/search?q=apple%20-pie&hl=en-GB&gl=UK&ceid=GB:en
The RSS feed for top stories is the simplest one. Just append RSS to the https://news.google.com and you get the RSS feed of the top stories of your location.
https://news.google.com/rss
Know more

WooCommerce Rest API - Product category filter not working

I have created an app which is displaying some products using the WooCommerce Rest API.
I have applied a few filters and everything was looking good until I tried to apply a filter for the category
http://foo/wc-api/v3/products?filter[limit]=15&filter[category]=some-category&oauth_consumer_key=ck_xx&oauth_nonce=xx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=xx&oauth_version=1.0&filter%5Blimit%5D=15&filter%5Bcategory%5D=antioxidants&oauth_signature=xx%3D
Now I get the message
DENIED - The requested resource requires user authentication. (XHR): GET ...
Any ideas why that is?
Found the answer (at least it's working for me)
You need to make the filter[category] the first parameter in your query string.
I'll let the guys know about this too.

Confusion in datafetching from oodle API

I am currently editing my previous question because I finally found the solution "how to manage with oodle API ?" Now the actual point is I dont know how to integrate the result !
let me give you example I have generated my API key and through my API key I can access data from oodle !
http://api.oodle.com/api/v2/listings?key=TEST&region=chicago&category=vehicle/car
In case of "TEST" i write my API key.
Now the problem is this link returns value in XML but how can i fetch it from XML ? Now the point is I don't want to open this link but I want XML data from the page ! Try to visit link given above. You can get idea.
Hope for the positive answer !
For more information I have read this link
http://developer.oodle.com/

Resources