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