Jenkins post JUnit report on github pull request - github

I've already made Jenkins test the pull request and post the result( success or fail ) like this.
Developers can click the Details button, and it will open jenkin's page to display the error messages.
However, I want to directly display the error message on the github instead of check on the jenkin's page.
Is there any way to achieve that?
If I need to tell more information, please let me know.
Update
I add Github PR post comment in Post build task like this. The column of Content is default, I'm not sure it's correct or not.
But I didn't see the comment after the jenkins retest, did I set the configuration wrongly?

Finally, I choose to post error message directly at comment via python and Github API
And I used this script https://gist.github.com/rmcgibbo/3433798, it's really useful.

Related

Automate filter files on pull request

I have created a github repo and deployed a simple HTML, CSS and JS website on it.
I want to create a github bot to automatically filter the pull request on the following basis:
If only the JS file is changed then the pull request is valid else it is invalid
Is it really possible to do that?
Thanks a lot for your help 😊
You could use a GitHub Action for that.
For instance, banyan/auto-label applies label based on file type.
In your case, fork that repository, and make your own GitHub Action in order to reject the PR if you detect a file whose extension is not the one set in your action.
A rejection ("mergeability of PR") can involve status check policy.

How can I link an issue when am I filling out a pull request form on GitHub?

There is a manual https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
and I cannot complete the 4th step because I cannot find "Linked issues".
just write #issue number in pull request description to link the isuue
you can also write fixes #issue number closes #issue number to automatically close an issue when your pull request is accepted and merged
if you are the owner of the repository you can link an issue by clicking the setting icon in the Linked Issues on the right sidebar but if you are an outside contributor then you cant use it to change or link any issue you can only see which issues are linked

Github PR template progress API

Recently we've started using the github pull request templates to provide more info about the code being checked in.
Since there is a template one can see the progress, which is basically the number of fields filled in the PR template.
It is something like:
My question is, is there an API to analyze the same? Or is there a bot that does the same? Gives me the progress of the fields of the PR template?
You can start with the v3/pulls/reviews/ API
GET /repos/:owner/:repo/pulls/:number/reviews
That will list the reviews for a given PR (not PR template though, so you might have to create one artificially).

Creating an RSS feed for Github Stars

Is there some way to get an RSS feed for one's github stars list?
I want to get it into Pinboard via IFTTT.
The current answer here gives the stars as JSON rather than RSS. Here's how I get my GitHub stars through the IFTTT RSS service:
Use the "New feed item matches" trigger
Enter your GitHub user RSS feed:
https://github.com/csu.atom
Set the "Keyword or simple phrase" that IFTTT will use to match items to:
[your username] starred
For example, my filter is set to csu starred (the word "starred" alone would probably work, but then the trigger might also fire on some false positives, like if a repository name or something else includes the word "starred").
Add whatever action you want to happen whenever this trigger fires. The link to the starred repository is in the {{EntryUrl}} variable and the title is in {{EntryTitle}}.
Your Github stars are available in JSON at a URL like this: https://api.github.com/users/username/starred (sub in your own username of course)
I found this Yahoo! Pipes thing to turn your stars into an RSS feed.
The Yahoo Pipes service has shut down, and IFTTT apparently dropped the stars trigger from their Github channel. So I went and created the same thing in my own Huginn instance, using a Website Agent and a Post Agent.
IFTTT now has this option. All you have to do is create a recipe.
Just put the "New Starred Repository" for THIS. And then do the appropriate steps for Pinboard for THAT.
EDIT
So apparently it might not work anymore, maybe, however on browsing the recipies I found this, which probably does work so try it, just remember to edit it for your github username
I've combined the SiftRSS service (https://siftrss.com/) with https://github.com/username.atom activity feed the OP mentioned. On SiftRSS I filter the activity feed with a /\bstarred\s\w+\/\w+/ regex on the title attribute. Works flawlessly but is dependend on a third party service, if one needs to self-host, I would also recommend using Huginn as #larcher already mentioned.

Facebook Send Dialog fails to send links to Facebook itself -- why?

I'm trying to use Facebook Send Dialog in a WinForms frame with a browser control and direct URI (you can repro just by clicking the links below). It works fine with link=http://www.foo.com, sending the message properly if you enter a message and click "Send":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.foo.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
However, this fails with link=http://www.facebook.com or any path under it. Clicking "Send" just gets you "Sorry, something went wrong. We're working on getting this fixed as soon as we can.":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
The aim is to write a script to make it easier to send messages asking all users in a particular group to a page (prepopulating the recipient list). Since Facebook has restricted groups larger than 500 members, our organization has to move to a Facebook Page, and I want the Send Dialog to link the new Facebook Page. Why won't this work? Is there a workaround? Are there other criteria for what links Send Dialog will and won't send?
Also, is there a way I can determine whether the send occurred or not, for example an event to catch? Whether you send or cancel, the Navigated event is still redirect_uri/#_=_.
Once I have Send Dialog working, I will add Show-FBSendDialog to Facebook PowerShell Module, which already has numerous capabilities to automate Facebook from PowerShell.
ran some tests and it seems it is blocking any fb domain http://on.fb.me/91S2P8, sometimes this is temporary otherwise need to rethink...
I see your second link isn't working... but if you add your company page id or name to link it should work. following link works for me:
https://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com/Intel&redirect_uri=http%3A%2F%2Fjonnewman.com%2F&display=popup&to=100002395463043
hope this helps
I got solution. I also had same problem. No post helped me. Solving error for 2 days.
There were posibility of two mistakes(that was done by me).
Link Parameter given in url should be working. I have linked to api namespace but not given SSL url. So it was giving problem. You can given your web site address.
And redirect_uri parameter should be working. Try to give redirect_uri to same page most probably.