Jira automation smart values of github integration - github

I have the Github integration for Jira and want to set up some Jira automations integrating with Github API. What I'm looking for specifically is the possibility to get hold of either the Github PR id (or the full PR link) from the "smart values" library within Jira.
I've tried issue.property[development].pr but it doesn't return anything.
Any ideas if the PR info is exposed as smart values in Jira at all?

All the GitHub related data would be present in the webhookData smart value, which will contain the data sent by GitHub's webhook.
So to access the PR's URL, you can use webhookData.pull_request.html_url as shown in the screenshot below. Similarly, you can access any other field sent by GitHub's webhook payload via webhookData.
Credits: The complete steps on integrating Jira and GitHub using Automation for Jira is provided in Simeon Ross's article.
The issue smart value would have all the data associated with a JIRA issue. You can create custom fields and set them to the issue when the GitHub data is receiver by the webhook. So if you have added any GitHub data to your issue, you can find the json representation of the issue and try finding out the right smart value with customField.value. You can try accessing the custom fields by following the steps in here.

Related

Listing items in Azure DevOps associated with differences between two tags

When we create pull requests we associate one or many items to the PR, sometimes we want to view items associated with merges from PRs between two tags - is this possible with the native DevOps functionality and if not is there an easy way to do this with the API?
Is this possible with the native DevOps functionality?
I'm afraid DevOps does not have such a built-in function to meet your requirements directly.
Is there an easy way to do this with the API?
According to the document of list pull request work items, we only support checking linked work items based on pull request id but not tags.
We recommend that you could submit a suggestion ticket to suggest the feature on the Developer community.
As a workaround, you can manually view the pull requests and compare their differences.
Here is an extension names Pull Request Manager Hub, it can display the tags and work items count of the pull requests. It may be useful for you.

Is there any way using azure-devops API, notify us via email if there are any changes in wiki page or If any new wiki pages created

Using Azure DevOps API, I would like to create an application with below functionality
When ever there are changes in azure devops wiki pages, it should notify us using an email
And also when ever there is new Wiki page created , it should notify us through an email.
Can somebody help on whether it is possible or not, If possible please help us with SDK and all.
I am looking for an exact API, which I need to work.
According to my test and try with the Wiki pages API and Wikis API, we seem have no such API can be used to sent email notifications when Wiki pages added or updated.
The workaround, as #jessehouwing mentioned, you can push the wiki pages as the source files of a Git repository in the project. Then you can set the email notifications for code changes in this Git repository.
You can set up a special repository for Wikis in the project.

How to add the commit's description to the discord webhook bot messages?

I followed this tutorial to create a Webhook between Github and Discord.
https://support.discordapp.com/hc/en-us/articles/228383668
Everything worked as expected and the bot is updating the chat just fine.
Despite searching in the Docs
( https://discordapp.com/developers/docs/resources/webhook ), I
could not find how to configure the bot so it also displays the commit's description.
I don't really know if this is possible, can someone point me how to handle this?
The Discord GitHub webhook does display the first line of the commit which git typically treats as a summary.
The GitHub push webhook publishes a json document containing fields such as head, refs, and a commits array with fields such as message and author.
However, the default Discord webhook expects a simpler json document with just a content field for the message body. This webhook will reject a GitHub push document.
However Discord also provides a special GitHub webhook that understands the payload of the GitHub push webhook. You've set this up but as noted only displays the first line of the commit. There doesn't seem to be any way to customize it.
If you want to display the full commit message, you'll need a custom bot that can receive the GitHub push event, format a new json document in the form expected by the default Discord webhook, and send it to the Discord API.
There is already an app that does this. The developer has abandoned it in favor of the official Discord GitHub webhook but left it running for now. It's easy to integrate and it does display the full commit message. It does require a public GitHub repository however.

How can I add a participant to an Issue through the GitHub API?

I'm looking for a way to add a list of participants to a GitHub Issue using the GitHub API.
I have tried:
Assigning the issue through the GitHub API.
Works, adding participants, but may be too direct, and there is a limit of 10 assignees.
#mentioning users in the description and a comment.
Does not add participants
My end goal here is to create an issue representing an deploy and #mention everyone who has a PR being deployed so that they know to help test. I'd like everyone to get a GitHub notification about the issue as it is created. Adding them to the list of participants seems like it should be the best way to accomplish this.

How to filter pull requests on GitHub by commentaries authors?

There are a plenty of Pull Requests on GitHub. Each pull request goes through code review process by one of a few developers. Is there a way to filter out only those pull requests, that has been reviewed by a specific user?
I've tried multiple filters:
build-in GitHub is:open mentions:nattfodd - shows only PRs where there are replies to nattfodd's commentaries, skips PRs with nattfodd's commentaries, but w/o replies to them
simply typed nickname to search field - same behavior
Is it even possible to get what I want?
Github is already providing a very powerfull search API, which includes
Search by a commenter within an issue or pull request.
You can use the filter in the following way: commenter:nattfodd.
For more information please refer the official page here.