1回答
- 新しい順
- 投票が多い順
- コメントが多い順
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.
回答済み 2年前
関連するコンテンツ
- AWS公式更新しました 2年前