diff --git a/backstage/team-backstage.sh b/backstage/team-backstage.sh index b26d2f8..715fe70 100644 --- a/backstage/team-backstage.sh +++ b/backstage/team-backstage.sh @@ -10,44 +10,52 @@ echo "Fetching Github data" url1="https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-showcase+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" url2="https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-plugins+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" -url3="https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" +url3="https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Foperator+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" +url4="https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" +url5="https://api.github.com/search/issues?q=repo%3Aredhat-developer%2Fred-hat-developers-documentation-rhdh+state%3Aopen+type%3Apr+created%3A<$PREVIOUS_DT&type=Issues" -showcase_github_data="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-showcase+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" -showcase_github_data+="\n: $(curl -s $url1 -H "Accept: application/json" | jq '.total_count // 0')" +github_data_a="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-showcase+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" +github_data_a+="\n: $(curl -s $url1 -H "Accept: application/json" | jq '.total_count // 0')" -plugins_github_data="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-plugins+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" -plugins_github_data+="\n: $(curl -s $url2 -H "Accept: application/json" | jq '.total_count // 0')" +github_data_b="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fbackstage-plugins+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" +github_data_b+="\n: $(curl -s $url2 -H "Accept: application/json" | jq '.total_count // 0')" -janusidp_github_data="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" -janusidp_github_data+="\n: $(curl -s $url3 -H "Accept: application/json" | jq '.total_count // 0')" +github_data_c="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Foperator+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" +github_data_c+="\n: $(curl -s $url3 -H "Accept: application/json" | jq '.total_count // 0')" + +github_data_d="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" +github_data_d+="\n: $(curl -s $url4 -H "Accept: application/json" | jq '.total_count // 0')" + +github_data_e="\n: $(curl -s 'https://api.github.com/search/issues?q=repo%3Aredhat-developer%2Fred-hat-developers-documentation-rhdh+state%3Aopen+type%3Apr' -H "Accept: application/json" | jq '.total_count // 0')" +github_data_e+="\n: $(curl -s $url5 -H "Accept: application/json" | jq '.total_count // 0')" echo "Posting on slack" data='{ - text: 'GitHub Status report', - blocks: [ + "text": 'GitHub Status report', + "blocks": [ { "type": 'header', - text: { + "text": { "type": 'plain_text', - text: head + "text": head } }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: '*backstage-showcase*' + "text": '*backstage-showcase*' } ] }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: github_data_a + "text": "'$github_data_a'" }, ] }, @@ -56,19 +64,19 @@ data='{ }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: '*backstage-plugins*' + "text": '*backstage-plugins*' } ] }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: github_data_b + "text": "'$github_data_b'" }, ] }, @@ -77,19 +85,20 @@ data='{ }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: '*janus-idp.github.io*' + "text": '*operator*' + } ] }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: github_data_c + "text": "'$github_data_c'" }, ] }, @@ -98,46 +107,46 @@ data='{ }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: '*operator*' + "text": '*janus-idp.github.io*' } ] }, { "type": 'section', - fields: [ + "fields": [ { "type": 'mrkdwn', - text: github_data_d + "text": "'$github_data_d'" }, ] }, { "type": 'divider' }, - { - "type": "section", - fields: [ { - "type": "mrkdwn", - text: "*red-hat-developers-documentation-rhdh*", + "type": "section", + "fields": [ + { + "type": "mrkdwn", + text: "*red-hat-developers-documentation-rhdh*", + }, + ], + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + text: "'$github_data_e'", + }, + ], }, - ], - }, - { - "type": "section", - fields: [ { - "type": "mrkdwn", - text: github_data_e, + "type": "divider", }, - ], - }, - { - "type": "divider", - }, ] }' diff --git a/konflux/forum-koflux-ui.sh b/konflux/forum-koflux-ui.sh index 28e5fb9..896c5c0 100644 --- a/konflux/forum-koflux-ui.sh +++ b/konflux/forum-koflux-ui.sh @@ -4,7 +4,6 @@ authorization="Authorization: Bearer "$1 echo "Generating Status Report" -# head="HELLO @hac-dev-team" head='RHTAP UI' echo "Fetching RHTAP stories"