@@ -25,39 +25,40 @@ jobs:
2525 echo "No previous commits"
2626 size=0
2727 fi
28+ echo "::set-env name=SIZE::$size"
2829 - name : Add label
2930 run : |
30- if [ $size -gt 100 ]; then
31+ if [ ${{ env. size }} -gt 100 ]; then
3132 echo "Adding size: XXL"
3233 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3334 -H "Accept: application/vnd.github.v3+json" \
3435 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
3536 -d '["size: XXL"]'
36- elif [ $size -gt 50 ]; then
37+ elif [ ${{ env. size }} -gt 50 ]; then
3738 echo "Adding size: XL"
3839 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3940 -H "Accept: application/vnd.github.v3+json" \
4041 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
4142 -d '["size: XL"]'
42- elif [ $size -gt 30 ]; then
43+ elif [ ${{ env. size }} -gt 30 ]; then
4344 echo "Adding size: L"
4445 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
4546 -H "Accept: application/vnd.github.v3+json" \
4647 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
4748 -d '["size: L"]'
48- elif [ $size -gt 15 ]; then
49+ elif [ ${{ env. size }} -gt 15 ]; then
4950 echo "Adding size: M"
5051 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
5152 -H "Accept: application/vnd.github.v3+json" \
5253 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
5354 -d '["size: M"]'
54- elif [ $size -gt 7 ]; then
55+ elif [ ${{ env. size }} -gt 5 ]; then
5556 echo "Adding size: S"
5657 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
5758 -H "Accept: application/vnd.github.v3+json" \
5859 https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
5960 -d '["size: S"]'
60- else [ $size -gt 2 ]
61+ else
6162 echo "Adding size: XS"
6263 curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
6364 -H "Accept: application/vnd.github.v3+json" \
0 commit comments