Skip to content

CLOUDP-300821: [AtlasCLI] Update help text of commands with --file flags to clarify we will ignore not documented fields #1151

CLOUDP-300821: [AtlasCLI] Update help text of commands with --file flags to clarify we will ignore not documented fields

CLOUDP-300821: [AtlasCLI] Update help text of commands with --file flags to clarify we will ignore not documented fields #1151

Workflow file for this run

---
name: Create JIRA ticket for dependabot prs
on:
pull_request:
types: [opened]
permissions:
pull-requests: write
contents: write
repository-projects: read
jobs:
jira_task:
name: Create Jira issue
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 2
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
- name: Find JIRA team
id: find
run: |
# shellcheck disable=SC2016 # intended use of single quotes
GH_TEAM="$(git diff HEAD~1..HEAD -- go.mod | grep -v '// indirect' | grep -i '^\-' | grep -v '^\-\-\-' | awk '{print $2}' | xargs -I $$ jq -r --arg i $$ '.[$i]' build/ci/library_owners.json | head -1)"
if [[ ("$GH_TEAM" == "") || ("$GH_TEAM" == "null") ]]; then
GH_TEAM="apix-2"
fi
echo "GH_TEAM=$GH_TEAM"
JIRA_TEAM="$(jq -r --arg i "$GH_TEAM" '.[$i]' < build/ci/library_owners_jira.json)"
echo "JIRA_TEAM=$JIRA_TEAM"
echo "assigned_team=$JIRA_TEAM" >> "${GITHUB_OUTPUT}"
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@v6
id: create
with:
token: ${{ secrets.JIRA_API_TOKEN }}
project-key: CLOUDP
summary: AtlasCLI Dependency Update n. ${{ github.event.pull_request.number }}
issuetype: Story
description: "This ticket tracks the following GitHub pull request: ${{ github.event.pull_request.html_url }}."
components: AtlasCLI
assignee: ${{ secrets.ASSIGNEE_JIRA_TICKET }}
extra-data: |
{
"fields": {
"fixVersions": [
{
"id": "41805"
}
],
"customfield_12751": [
{
"id": "${{ steps.find.outputs.assigned_team }}"
}
],
"customfield_10257": {
"id": "11861"
}
}
}
- name: Add comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
The ticket [${{ steps.create.outputs.issue-key }}](https://jira.mongodb.org/browse/${{ steps.create.outputs.issue-key }}) was created for internal tracking.
Note: Jira ticket will be closed automatically when this PR is merged.
- name: Add auto_close_jira label
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit "${{github.event.pull_request.html_url}}" --add-label "auto_close_jira"
- name: Set auto merge
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh pr merge "${{ github.event.pull_request.html_url }}" --auto --squash