3939 AUTHOR : ${{ steps.extract.outputs.author }}
4040 VERSION : ${{ steps.extract.outputs.version }}
4141 run : ./build/package/gen-ssdlc-report.sh
42-
42+ - name : set Apix Bot token
43+ id : app-token
44+ uses : mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
45+ with :
46+ app-id : ${{ secrets.APIXBOT_APP_ID }}
47+ private-key : ${{ secrets.APIXBOT_APP_PEM }}
48+ - name : Find JIRA ticket
49+ id : find
50+ uses : mongodb/apix-action/find-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
51+ with :
52+ token : ${{ secrets.JIRA_API_TOKEN }}
53+ jql : project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Compliance Report"
54+ - name : Set JIRA ticket (find)
55+ if : steps.find.outputs.found == 'true'
56+ run : |
57+ echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV"
58+ - name : Create JIRA ticket
59+ uses : mongodb/apix-action/create-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
60+ id : create
61+ if : steps.find.outputs.found == 'false'
62+ with :
63+ token : ${{ secrets.JIRA_API_TOKEN }}
64+ project-key : CLOUDP
65+ summary : " [AtlasCLI] Update Compliance Report"
66+ issuetype : Story
67+ description : Update Compliance Report
68+ components : AtlasCLI
69+ assignee : ${{ secrets.ASSIGNEE_JIRA_TICKET }}
70+ extra-data : |
71+ {
72+ "fields": {
73+ "fixVersions": [
74+ {
75+ "id": "41805"
76+ }
77+ ],
78+ "customfield_12751": [
79+ {
80+ "id": "22223"
81+ }
82+ ],
83+ "customfield_10257": {
84+ "id": "11861"
85+ }
86+ }
87+ }
88+ - name : Set JIRA ticket (create)
89+ if : steps.find.outputs.found == 'false'
90+ run : |
91+ echo "JIRA_KEY=${{steps.create.outputs.issue-key}}" >> "$GITHUB_ENV"
92+ - uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
93+ id : pr
94+ with :
95+ token : ${{ steps.app-token.outputs.token }}
96+ committer : " ${{ steps.app-token.outputs.user-name }} <${{ steps.app-token.outputs.user-email }}>"
97+ author : " ${{ steps.app-token.outputs.user-name }} <${{ steps.app-token.outputs.user-email }}>"
98+ title : " ${{ env.JIRA_KEY }}: Update compliance report for v${{ steps.extract.outputs.version }}"
99+ commit-message : " ${{ env.JIRA_KEY }}: Update compliance report for v${{ steps.extract.outputs.version }}"
100+ delete-branch : true
101+ base : master
102+ branch : ${{ env.JIRA_KEY }}
103+ labels : |
104+ compliance
105+ auto
106+ auto_close_jira
107+ body : |
108+ ## Proposed changes
109+ Update compliance report for v${{ steps.extract.outputs.version }}
110+ _Jira ticket:_ ${{ env.JIRA_KEY }}
111+
112+ Note: Jira ticket will be closed automatically when this PR is merged.
113+
114+ - name : Set auto merge
115+ env :
116+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
117+ run : |
118+ gh pr merge "${{ steps.pr.outputs.pull-request-url }}" --auto --squash
0 commit comments