Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix part of #5508: Limit APK/AAB Difference analysis reports in the P…
…R Comment Thread (#5532) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5508 ### This PR includes Steps to locate the previous `stats.yml` workflow run, download its build artifact, and compare it with the current build log. If changes are detected, a comment will be uploaded to help minimize comment thread overload. **The implementation:** - Download the previous build log artifact (if available). - Run the script. - Compare the current generated build log with the previous build log artifact: - if no differences are found -> skip commenting. - if differences are found -> comment the current generated build log - if no previous artifact is found -> comment the current generated build log - This occurs in 2 instances: - 1. It's the first run of the PR. - 2. An error occurred during the previous stat check (since the previous build is from the second-to-last run ID). - Upload the current build log as an artifact (for the next stat run). - Comment/skip the stat report based on the comparison result. # ### Tested with a cloned PR _(with stats.yml implementation on develop)_ Tested PR: Rd4dev/Oppia-Android-Fork-from-Fork#40 Reference for proof of implementation: - [x] should comment on initial run | [comment](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) | [stack trace](https://github.com/Rd4dev/Oppia-Android-Fork-from-Fork/actions/runs/10762876260/job/29843752198#step:19:26) - [x] shouldn't comment when no change | [reference1](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) | [reference2](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) - [x] should comment on change | [comment](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) | [reference](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) - [x] comment on previous build fail (replicated!) | [comment](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) | [reference](Rd4dev/Oppia-Android-Fork-from-Fork#40 (comment)) ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). --------- Co-authored-by: Ben Henning <[email protected]>
- Loading branch information