You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, I want to get feedback on my pull requests, which tells me how the proposed changes will impact my Code PushUp reports. Specifically, I want a comment to be posts a report diff summary in Markdown. The diff should list which categories and audits have improved or regressed, and by how much.
As a paying customer, I also want to view the full diff in the portal UI. The PR comment should include a link to the portal diff page. I also want to be able to access this diff from the portal directly, by selecting source and target Git refs (branches/commits/tags).
The GitHub Action will accept optional parameters for interacting with portal. The flow will then differ from the free version in a few ways:
Since it's likely that the target branch (e.g. main) already has an uploaded report, we can download it from the portal API instead of running collect again. This report caching should speed up CI runs.
Because we want the reports to be accessible in the portal as well (primarily via link in PR comment), all reports collected by the GitHub Action are also uploaded to the portal (autorun instead of collect).
The Markdown comment will have an additional link added, for accessing the full diff in the portal.
In order to compare any two reports by branch/commit/etc., the portal API will implement the diffing logic as well. In this case, the diff could be more complex, e.g. to compare which issues were introduced or fixed (would be too much detail to include in MD comment).
User story
As a user, I want to get feedback on my pull requests, which tells me how the proposed changes will impact my Code PushUp reports. Specifically, I want a comment to be posts a report diff summary in Markdown. The diff should list which categories and audits have improved or regressed, and by how much.
As a paying customer, I also want to view the full diff in the portal UI. The PR comment should include a link to the portal diff page. I also want to be able to access this diff from the portal directly, by selecting source and target Git refs (branches/commits/tags).
Architecture
Free version
graph TD; user(["🤓 User"]) pr(["📑 Pull Request"]) comment(["🗨️ PR comment"]) user -- creates --> pr user -- "👁️🗨️ views" --> comment pr -- triggers --> ghAction postComment -- creates --> comment subgraph ghAction ["🏗️ code-pushup/github-action"] collectSrc[["git checkout $GITHUB_HEAD_REF\ncode-pushup collect"]] collectTgt[["git checkout $GITHUB_BASE_REF\ncode-pushup collect"]] compare[["code-pushup compare source-report.json target-report.json"]] postComment[["github.issues.createComment({ ... })"]] srcReport("source-report.json") tgtReport("target-report.json") diffJson("reports-diff.json") diffMd("reports-diff.md") collectSrc --> srcReport collectTgt --> tgtReport srcReport & tgtReport --> compare compare --> diffJson & diffMd diffMd --> postComment endPaid version
graph TD; user(["🤓 User"]) pr(["📑 Pull Request"]) comment(["🗨️ PR comment"]) ghAction{{"🏗️ code-pushup/github-action"}} portal[("🌈 Portal")] user -. "💰 pays for" .-> portal user -- creates --> pr user -- "👁️🗨️ views" --> comment pr -- triggers --> ghAction ghAction -- "🗘 uploads to\n& downloads from" --> portal ghAction -- creates --> comment comment -- "🔗 links to" --> portalThe GitHub Action will accept optional parameters for interacting with portal. The flow will then differ from the free version in a few ways:
main) already has an uploaded report, we can download it from the portal API instead of runningcollectagain. This report caching should speed up CI runs.autoruninstead ofcollect).In order to compare any two reports by branch/commit/etc., the portal API will implement the diffing logic as well. In this case, the diff could be more complex, e.g. to compare which issues were introduced or fixed (would be too much detail to include in MD comment).
Acceptance criteria
Free features:
Paid features:
Follow-up improvements