when this Automation to run when deployment deployed to production environment runs
Asked by Shalini.Saravanan-extern:

We have recently migrated GitHub repo to new one, integrated repo with JIRA, now the automation we had for when deployment succeeded to production environment is not running in the repo.

Repo is integrated, also PR and branch names are showing in JIRA ticket as expected, but when the PR is merged to branch "production" the automation is not running, where to check for the environment is coded? Is it possible to change the branch name as "main" for production deployment?


Answers:
author: Shalini.Saravanan-extern
body: ![Screenshot 2024-07-27 at 10.21.02?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/338304i6DB26BD2BF7BBFEC/image-size/large?v=v2&px=999 "Screenshot 2024-07-27 at 10.21.02?AM.png")![Screenshot 2024-07-27 at 10.22.19?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/338305i5A3DFEA66E7C1557/image-size/large?v=v2&px=999 "Screenshot 2024-07-27 at 10.22.19?AM.png")![Screenshot 2024-07-27 at 10.23.36?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/338306iB89A5030BE4BD826/image-size/large?v=v2&px=999 "Screenshot 2024-07-27 at 10.23.36?AM.png")Here is the workflow, when code changes pushed to production branch in newly integrated GitHub but the automation isn't running, what updates needed for the workflow to run when code deployed in prod? and where the environment is coded


author: Shalini.Saravanan-extern
body: Here is the workflow, when code changes pushed to production branch in newly integrated GitHub but the automation isn't running, what updates needed for the workflow to run when code deployed in prod? and where the environment is coded?


author: Trudy Claspill
body: Hello [@Shalini.Saravanan-extern](/t5/user/viewprofilepage/user-id/5228070)

When you ask for help with an Automation rule not doing what you expect or intend there are two things you should provide that will help us help you.

1. Provide screen images showing the entire rule and the details from the Rule Details page and for each step in the rule.

2. The details from the last execution of the rule after you made an issue update that should've triggered the rule. If the rule was triggered the Audit Log for the rule execution could contain details that help debug the problem.

comments: author: Trudy Claspill
body: Based on the Audit log information the rule is not being triggered. That means that Jira is not recognizing that a deployment has occurred, or it is not recognizing that the deployment was successful, or it doesn't think the deployment has occurred in the specified environment.

Are you using GitHub Cloud or GitHub Enterprise?

What app did you use to support the integration of Github with your Jira Cloud instance?

If you used the Github for Jira app, have you reviewed this document?

<https://support.atlassian.com/jira-cloud-administration/docs/link-github-workflows-and-deployments-to-jira-issues/>

Based on that documentation, merging a pull request to a particular branch is not the same thing as "deployment".

Are you using Github to execute a deployment, or some other tool?

Are the Deployments showing in the Development Tools panel in the issues? Note that deployments are separate from commits, pull requests, and merges.


author: Shalini.Saravanan-extern
body: We dont have GitHub action that sends data to jira as deployment succeeded. As I mentioned earlier we had GitHub repo earlier and imported to new repo recently integrated the repo(even with the old repo we dint have any action created but the deployment succeeded worked fine), branch and pull request are showing here and even the build.

But when the PR is merged with production branch we dont see the above action running. so where the environment is actually coded? apart from GitHub action how to make JIRA recognise the deployment?

![Screenshot 2024-07-27 at 11.50.11?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/338309i6D68F2112C5258B1/image-size/large?v=v2&px=999 "Screenshot 2024-07-27 at 11.50.11?AM.png")


author: Shalini.Saravanan-extern
body: ![Screenshot 2024-07-27 at 11.55.33?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/338310iF32EA6A2E51126D0/image-size/large?v=v2&px=999 "Screenshot 2024-07-27 at 11.55.33?AM.png")

Here is where the GitHub is integrated.

And in GitHub apps JIRA Integration can be seen


author: Trudy Claspill
body: Just to be clear, I am not an expert in the GitHub/ Jira integration, and I don't have details about the internal workings. I am just using what I can find on the internet to make suggestions.

Is a deployment actually occurring in Github? Are you manually triggering a deployment to an environment or using a Github action in the merge of the PR to the production branch to trigger a deployment? If so, what is the name of the deploy environment in GitHub?

Again referencing the same document, in the section headed "Map your deployment environments" the deployment events that Jira sees include the name of the deployment environment. Jira will try to figure out which of the environments that correlates to, but if it can't then you can create a mapping of the actual environment names to the names used in Jira.


Tags: cloud

jira-cloud