@@ -28,21 +28,39 @@ jobs:
2828 - name : Add label
2929 run : |
3030 if [ $size -gt 100 ]; then
31- echo "Adding size: L"
31+ echo "Adding size: XXL"
32+ curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
33+ -H "Accept: application/vnd.github.v3+json" \
34+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
35+ -d '["size: XXL"]'
36+ elif [ $size -gt 50 ]; then
37+ echo "Adding size: XL"
3238 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3339 -H "Accept: application/vnd.github.v3+json" \
3440 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
35- --data '["size: L "]'
41+ -d '["size: XL "]'
3642 elif [ $size -gt 30 ]; then
43+ echo "Adding size: L"
44+ curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
45+ -H "Accept: application/vnd.github.v3+json" \
46+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
47+ -d '["size: L"]'
48+ elif [ $size -gt 10 ]; then
3749 echo "Adding size: M"
3850 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3951 -H "Accept: application/vnd.github.v3+json" \
4052 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
41- --data '["size: M"]'
42- else
53+ -d '["size: M"]'
54+ elif [ $size -gt 5 ]; then
4355 echo "Adding size: S"
4456 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
4557 -H "Accept: application/vnd.github.v3+json" \
4658 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
47- --data '["size: S"]'
59+ -d '["size: S"]'
60+ else
61+ echo "Adding size: XS"
62+ curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
63+ -H "Accept: application/vnd.github.v3+json" \
64+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
65+ -d '["size: XS"]'
4866 fi
0 commit comments