Skip to content

Commit

Permalink
DBZ-2592 Minor improvements, Enabling GH Actions for release contribu…
Browse files Browse the repository at this point in the history
…tors script
  • Loading branch information
ani-sha authored and gunnarmorling committed Mar 18, 2021
1 parent 135fd15 commit a410ecd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release-contributors-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ on:
workflow_dispatch:
inputs:
tag1:
description: 'From Release Tag'
description: 'From Release Tag(e.g. v1.5.0.CR1)'
required: true
tag2:
description: 'To Release Tag'
description: 'To Release Tag(e.g. v1.5.0.Final)'
required: true

jobs:
script:
runs-on: ubuntu-latest

steps:
- name: Checkout action
uses: actions/checkout@v1
- name: Run script
run: |
./github-support/list-contributors.sh ${{ github.event.inputs.tag1 }} ${{ github.event.inputs.tag2 }}
13 changes: 10 additions & 3 deletions github-support/list-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -euo

if [ $# -eq 0 ];then
echo "No release parameters provided"
exit 1
fi

DIR="$HOME/debezium-contributors"
ALIASES="jenkins-jobs/scripts/config/Aliases.txt"
FILTERS="jenkins-jobs/scripts/config/FilteredNames.txt"
Expand Down Expand Up @@ -36,16 +41,18 @@ do
if grep -qi "^$NAME" $CONTRIBUTORS_ALIASES; then
REAL_NAME=`grep -i "^$NAME" $CONTRIBUTORS_ALIASES | head -1 | awk '{split($0,a,","); print a[2]}'`
sed -n -e "s/ $NAME/\[$REAL_NAME\]/p" $CONTRIBUTORS_NAMES >> $CONTRIBUTORS_LIST_TXT
elif grep -qi "^$NAME" $CONTRIBUTORS_FILTERS; then
elif grep -qi "$NAME" $CONTRIBUTORS_FILTERS; then
sed -n "/$NAME/d" $CONTRIBUTORS_NAMES >> $CONTRIBUTORS_LIST_TXT
else
sed -n -e "s/ $NAME/\[$NAME\]/p" $CONTRIBUTORS_NAMES >> $CONTRIBUTORS_LIST_TXT
fi
fi
done < $CONTRIBUTORS_NAMES

sort $CONTRIBUTORS_LIST_TXT | uniq > $CONTRIBUTORS_NAMES

sort -t[ -k2 $CONTRIBUTORS_LIST_TXT | uniq > $CONTRIBUTORS_NAMES
sed -e '$!s/$/,/' $CONTRIBUTORS_NAMES

FIX_VERSION=`echo $2 | cut -d "v" -f 2`
echo "List of issues: https://issues.redhat.com/issues/?jql=project%20%3D%20DBZ%20AND%20fixVersion%20%3D%20$FIX_VERSION%20ORDER%20BY%20issuetype%20DESC"

rm -rf $DIR

0 comments on commit a410ecd

Please sign in to comment.