-
-
Notifications
You must be signed in to change notification settings - Fork 3
ci: log number of merged PRs into main
#80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Have you tried running this? I looked for run logs somewhere but didn't find any. I suspect that |
hi @HowardBraham 👋 Thank you for taking a look! So the work will be completed when I create the 2 platform PRs, one for Extension and Mobile, to add the flow there (like here). I haven't run it as I'm unsure how can I run this unless I create the PRs on the platforms 🤔 But it's a great point. I'll create the PRs and then see how can I test it and report back 🙏 |
Yeah you have to create the platform PRs and test them all together. There's no point in approving and merging this alone, it will never work correctly on the first try. |
main
main
main
main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Bash Arithmetic Error with Null Values
The workflow fails with a bash arithmetic error when incrementing the success count. This occurs because the current_number_of_successes
variable becomes the string "null" if an existing row for the current date in the Google Sheet has an empty or non-numeric value in column C. The jq
expression responsible for parsing the sheet data returns "null" in such cases, which bash cannot use in the arithmetic operation $(("$current_number_of_successes" + 1))
.
.github/workflows/log-merge-group-success.yml#L46-L47
github-tools/.github/workflows/log-merge-group-success.yml
Lines 46 to 47 in 4db842b
else | |
curl --silent --header "Authorization: Bearer $token" --header "Content-Type: application/json" --request PUT --data "{\"values\":[[\"$current_date\", \"\", $(("$current_number_of_successes" + 1))]]}" https://sheets.googleapis.com/v4/spreadsheets/"$SPREADSHEET_ID"/values/"$SHEET_NAME"!A"$current_date_index":C"$current_date_index"?valueInputOption=USER_ENTERED |
Was this report helpful? Give feedback by reacting with 👍 or 👎
closing in favour of #83 |
This PR creates a re-usable workflow which logs the number of PRs that get merged to main. The end goal of this is to extend our metrics, to better understand ci health, by getting the success merge rate, using both these data, and the number of PRs that get kicked out from the merge queue.
This PR is based on the work from @itsyoboieltr (see here)
Some notes: