Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aws #26

Closed
wants to merge 46 commits into from
Closed

Aws #26

wants to merge 46 commits into from

Conversation

Cpriyanshi77
Copy link
Contributor

No description provided.

rishabh96b and others added 30 commits October 13, 2023 11:53
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore: make textExistsInALine function process multiple values

role_output=$(aws sts assume-role --role-arn "$ROLE_ARN" --role-session-name default)

if [ $? -ne 0 ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. SC2181

exit 1
fi

AWS_ACCESS_KEY_ID=$(echo $role_output | jq -r '.Credentials.AccessKeyId')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

fi

AWS_ACCESS_KEY_ID=$(echo $role_output | jq -r '.Credentials.AccessKeyId')
AWS_SECRET_ACCESS_KEY=$(echo $role_output | jq -r '.Credentials.SecretAccessKey')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086


AWS_ACCESS_KEY_ID=$(echo $role_output | jq -r '.Credentials.AccessKeyId')
AWS_SECRET_ACCESS_KEY=$(echo $role_output | jq -r '.Credentials.SecretAccessKey')
AWS_SESSION_TOKEN=$(echo $role_output | jq -r '.Credentials.SessionToken')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086


aws_creds=$(getEncryptedCredential "$CREDENTIAL_MANAGEMENT" "$CREDENTIAL_MANAGEMENT_NAME.CREDENTIAL_KEY_VALUE_PAIR")

aws_access_key=$(echo $aws_creds | sed "s/'/\"/g" | jq -r '.aws_access_key')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

SRC_BRANCH="$1"
TGT_BRANCH="$2"
CONFLICTING_FILES="$3"
echo File,${SRC_BRANCH},${TGT_BRANCH} > fileAuthors.tmp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

SRC_BRANCH="$1"
TGT_BRANCH="$2"
CONFLICTING_FILES="$3"
echo File,${SRC_BRANCH},${TGT_BRANCH} > fileAuthors.tmp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

author=$(getLastAuthorOfFile "$BRANCH" "$FILE")
echo "${FILE}: ${author}"
# echo "Processing file [${FILE}]"
src_branch_author=`getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Use $(...) notation instead of legacy backticks .... SC2006

# echo "Processing file [${FILE}]"
src_branch_author=`getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}"`
# echo "Source branch Author: [${src_branch_author}]"
tgt_branch_author=`getLastAuthorOfFile "${TGT_BRANCH}" "${FILE}"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Use $(...) notation instead of legacy backticks .... SC2006

done

cat fileAuthors.tmp | csvlook

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. SC2002

SRC_BRANCH="$1"
TGT_BRANCH="$2"
CONFLICTING_FILES="$3"
echo File,${SRC_BRANCH},${TGT_BRANCH} > fileAuthors.tmp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

Suggested change
echo File,${SRC_BRANCH},${TGT_BRANCH} > fileAuthors.tmp
echo File,"${SRC_BRANCH}","${TGT_BRANCH}" > fileAuthors.tmp

author=$(getLastAuthorOfFile "$BRANCH" "$FILE")
echo "${FILE}: ${author}"
# echo "Processing file [${FILE}]"
src_branch_author=`getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

Suggested change
src_branch_author=`getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}"`
src_branch_author=$(getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}")

# echo "Processing file [${FILE}]"
src_branch_author=`getLastAuthorOfFile "${SRC_BRANCH}" "${FILE}"`
# echo "Source branch Author: [${src_branch_author}]"
tgt_branch_author=`getLastAuthorOfFile "${TGT_BRANCH}" "${FILE}"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

Suggested change
tgt_branch_author=`getLastAuthorOfFile "${TGT_BRANCH}" "${FILE}"`
tgt_branch_author=$(getLastAuthorOfFile "${TGT_BRANCH}" "${FILE}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants