1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
0
Hi there,
Hope you are doing well! I understand you want to know if there is a filter on the CodeCommit Console so you can filter out PullRequests activities.
Currently, there is no filter on the CodeCommit Console. Alternatively, you may consider using AWS API/CLI command, which can filter it using the following script:
RepoName="RepoName" #Please change the Repo name
todate="2022-12-20" #Please change the date you want to find by
todateN=$(date -d $todate +%s)
aws codecommit list-pull-requests --repository-name $RepoName | jq -c '.pullRequestIds[]' | while read prID; do
prNumber=$(echo "${prID//\"}") # remove "
prDetetails=$(aws codecommit get-pull-request --pull-request-id $prNumber)
# echo $prDetetails | jq '.pullRequest.lastActivityDate'
prNumber=$(echo "${prID//\"}") # remove "
prLastActivityDateTime=$(echo $prDetetails | jq '.pullRequest.lastActivityDate')
prLastActivityDate=$(echo $prLastActivityDateTime| awk '{ print substr( $0, 2, length($0)-24 ) }')
# echo prLastActivityDate: $prLastActivityDate
prLastActivityDateN=$(date -d $prLastActivityDate +%s)
#echo prLastActivityDate: $prLastActivityDate $prLastActivityDateN
if [ $prLastActivityDateN -ge $todateN ];
then
echo $prDetetails | jq '.pullRequest | "\(.pullRequestId) \(.lastActivityDate)"'
fi
done
Please note that the code above is for your use-case reference only, effort for developing and debugging your own code is required.
respondido há 2 anos
Conteúdo relevante
- AWS OFICIALAtualizada há 7 meses
- AWS OFICIALAtualizada há 3 anos
- AWS OFICIALAtualizada há 2 anos