-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf29190
commit ee72551
Showing
8 changed files
with
873 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Backstage Daily JIRA Status | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'backstage/**' | ||
# Trigger on a cron schedule (every weekday at 4:00 PM IST) | ||
schedule: | ||
- cron: '30 10 * * 1-5' # Adjusted for 4:00 PM IST in UTC | ||
workflow_dispatch: # Allow manual triggering of the workflow | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Bash Script | ||
run: bash backstage/team-backstage.sh ${{ secrets.PERSONAL_SLACK_HOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Konflux Daily JIRA Status | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'konflu/**' | ||
# Trigger on a cron schedule (every weekday at 10:00 AM IST) | ||
schedule: | ||
- cron: '30 4 * * 1-5' # Adjusted for 10:00 AM IST in UTC | ||
workflow_dispatch: # Allow manual triggering of the workflow | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Bash Script | ||
run: bash konflu/forum-konflu-ui.sh ${{ secrets.JIRA_PAT }} ${{ secrets.PERSONAL_SLACK_HOOK }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
set -e | ||
|
||
echo "Generating Status Report" | ||
|
||
head="\nBackstage GitHub Status" | ||
|
||
PREVIOUS_DT=`date -v -7d "+%F"` | ||
|
||
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" | ||
|
||
showcase_github_data="\n<https://github.com/search?l=&q=repo%3Ajanus-idp%2Fbackstage-showcase+state%3Aopen+type%3Apr | Total open PRs>: $(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<https://github.com/search?q=repo%3Ajanus-idp%2Fbackstage-showcase+state%3Aopen+type%3Apr+created%3A%3C$PREVIOUS_DT&type=Issues | PRs opened for more than a week>: $(curl -s $url1 -H "Accept: application/json" | jq '.total_count // 0')" | ||
|
||
plugins_github_data="\n<https://github.com/search?l=&q=repo%3Ajanus-idp%2Fbackstage-plugins+state%3Aopen+type%3Apr | Total open PRs>: $(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<https://github.com/search?q=repo%3Ajanus-idp%2Fbackstage-plugins+state%3Aopen+type%3Apr+created%3A%3C$PREVIOUS_DT&type=Issues | PRs opened for more than a week>: $(curl -s $url2 -H "Accept: application/json" | jq '.total_count // 0')" | ||
|
||
janusidp_github_data="\n<https://github.com/search?l=&q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr | Total open PRs>: $(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<https://github.com/search?q=repo%3Ajanus-idp%2Fjanus-idp.github.io+state%3Aopen+type%3Apr+created%3A%3C$PREVIOUS_DT&type=Issues | PRs opened for more than a week>: $(curl -s $url3 -H "Accept: application/json" | jq '.total_count // 0')" | ||
|
||
echo "Posting on slack" | ||
|
||
data='{ | ||
text: 'GitHub Status report', | ||
blocks: [ | ||
{ | ||
"type": 'header', | ||
text: { | ||
"type": 'plain_text', | ||
text: head | ||
} | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: '*backstage-showcase*' | ||
} | ||
] | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: github_data_a | ||
}, | ||
] | ||
}, | ||
{ | ||
"type": 'divider' | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: '*backstage-plugins*' | ||
} | ||
] | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: github_data_b | ||
}, | ||
] | ||
}, | ||
{ | ||
"type": 'divider' | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: '*janus-idp.github.io*' | ||
} | ||
] | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: github_data_c | ||
}, | ||
] | ||
}, | ||
{ | ||
"type": 'divider' | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: '*operator*' | ||
} | ||
] | ||
}, | ||
{ | ||
"type": 'section', | ||
fields: [ | ||
{ | ||
"type": 'mrkdwn', | ||
text: github_data_d | ||
}, | ||
] | ||
}, | ||
{ | ||
"type": 'divider' | ||
}, | ||
{ | ||
"type": "section", | ||
fields: [ | ||
{ | ||
"type": "mrkdwn", | ||
text: "*red-hat-developers-documentation-rhdh*", | ||
}, | ||
], | ||
}, | ||
{ | ||
"type": "section", | ||
fields: [ | ||
{ | ||
"type": "mrkdwn", | ||
text: github_data_e, | ||
}, | ||
], | ||
}, | ||
{ | ||
"type": "divider", | ||
}, | ||
] | ||
}' | ||
|
||
curl -X POST -H "Content-type:application/json" --data "$data" $1 | ||
|
||
echo "\nDone" |
Oops, something went wrong.