This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve the "detektFormat" task * Fix the pre-push hook * Test the pre-push hook * Fix file formatting * Fix messed up files * Setup DangerJS * Attempt Danger to comment with the Detekt report * Try to comment APK file on the PR using Danger * Update apk.yml * Remove 5k node modules form .gitignore * WIP: Setup DangerJS + upgrade wrapper * Danger PR * Danger PR (fix Markdown #1) * Add danger comment for the "APK" workflow * Add Danger Detekt * Fix the Danger comment in Detekt * Update Danger * Fix Danger "Detekt" message * WIP Danger * DangerJS devexp v0.0.1? * Rerun CI * Improve Danger * Improve Danger comments * Improve Danger comments 2 * Improve Detekt messages * Danger messages * Update Detekt baseline * Add "What's changed?" tip * PR template improvement
- Loading branch information
1 parent
067b6e2
commit 9f73c9d
Showing
23 changed files
with
1,280 additions
and
49 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,9 @@ | ||
**Great news! Your PR builds ✅** | ||
|
||
We've managed to generate a R8-optimized | ||
_(minify, obfuscate and shrink resources)_ APK with your changes. 👌 | ||
|
||
It's way faster than the `debug` build type but sometimes it may crash. So please, **test** and enjoy your ligthning-fast **[Ivy-Wallet-Demo.apk]()**. ⚡ | ||
|
||
_⚠️ It's important to download and test this APK artifact from the **["APK" workflow]()** or the link above because it may introduce runtime crashes in production._ | ||
|
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,43 @@ | ||
import { danger, markdown, message } from "danger"; | ||
|
||
const runID = process.env.GITHUB_RUN_ID; | ||
const repoFullName = danger.github.pr.base.repo.full_name; | ||
const artifactURL = `https://github.com/${repoFullName}/actions/runs/${runID}`; | ||
|
||
|
||
message(` | ||
## APK ready ✅ | ||
We've managed to generate a R8-optimized _(minify, obfuscate, and shrink resources)_ APK with your changes. 👌 | ||
It's way faster than the \`debug\` build type but sometimes it may crash. So please, **test** and enjoy your lightning-fast **[Ivy-Wallet-Demo.apk](${artifactURL})**. ⚡ | ||
_**Note:** It's important to download and test this APK artifact from the **["APK" workflow](${artifactURL})** or the link above because it may introduce runtime crashes in production._` | ||
); | ||
|
||
message(` | ||
## Detekt check finished 🕵️♂️ | ||
Our code quality check completed. ✅ | ||
If it fails, open the **"Detekt" workflow** run on your PR, scroll down and download the attached \`detekt-report.html\`. Please, inspect it and try to fix the errors. 🔎 | ||
_**Pstt,** don't worry - sometimes Detekt gives false-positives. Your reviewer will guide you towards the best next steps. 👍_` | ||
); | ||
|
||
markdown(` | ||
## Congratulations! 🎉 You're almost there... | ||
Your PR is a fact and it'll be reviewed as soon as possible. The last step is to receive an approving review and merge it. ✅ | ||
**The final thing left to do is:** | ||
- Upload a screen recording to prove that your code works. _(without it we can't merge your PR)_ | ||
**Code quality tips:** | ||
- The keyword is **simplicity**. | ||
- Can I do it in a more simple and straightforward way? | ||
- Can I do it with less code? If so, delete what's unnecessary. | ||
- Did I over-engineer it? | ||
_Thank you for your contribution! 👏_` | ||
); |
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,32 @@ | ||
import { danger, markdown, message } from "danger"; | ||
|
||
const runID = process.env.GITHUB_RUN_ID; | ||
const repoFullName = danger.github.pr.base.repo.full_name; | ||
const actionRunUrl = `https://github.com/${repoFullName}/actions/runs/${runID}`; | ||
|
||
message(` | ||
## Detekt check finished 🕵️♂️ | ||
Our code quality check completed. ✅ | ||
If it fails, open **[the "Detekt" workflow run](${actionRunUrl})** on your PR, scroll down and download the attached \`detekt-report.html\`. Please, inspect it and try to fix the errors. 🔎 | ||
_**Pstt,** don't worry - sometimes Detekt gives false-positives. Your reviewer will guide you towards the best next steps. 👍_` | ||
); | ||
|
||
markdown(` | ||
## Congratulations! 🎉 You're almost there... | ||
Your PR is a fact and it'll be reviewed as soon as possible. The last step is to receive an approving review and merge it. ✅ | ||
**The final thing left to do is:** | ||
- Upload a screen recording to prove that your code works. _(without it we can't merge your PR)_ | ||
**Code quality tips:** | ||
- The keyword is **simplicity**. | ||
- Can I do it in a more simple and straightforward way? | ||
- Can I do it with less code? If so, delete what's unnecessary. | ||
- Did I over-engineer it? | ||
_Thank you for your contribution! 👏_` | ||
) |
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,18 @@ | ||
import { markdown } from "danger" | ||
|
||
markdown(` | ||
## Congratulations! 🎉 You're almost there... | ||
Your PR is a fact and it'll be reviewed as soon as possible. The last step is to receive an approving review and merge it. ✅ | ||
**The final thing left to do is:** | ||
- Upload a screen recording to prove that your code works. _(without it we can't merge your PR)_ | ||
**Code quality tips:** | ||
- The keyword is **simplicity**. | ||
- Can I do it in a more simple and straightforward way? | ||
- Can I do it with less code? If so, delete what's unnecessary. | ||
- Did I over-engineer it? | ||
_Thank you for your contribution! 👏_` | ||
) |
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,9 @@ | ||
# Detekt check finished 🕵️♂️ | ||
|
||
Our code quality check completed. ✅ | ||
|
||
If it fails, [click here](), scroll down | ||
and download the attached **detekt-report.html**. Please, inspect it and try to fix the errors. 🔎 | ||
|
||
_**Pstt,** don't worry - sometimes Detekt gives false-positives. | ||
Your reviewer will guide towards the best next steps. 👍_ |
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,14 @@ | ||
**Congratualstions! 🎉 You're almost there...** | ||
|
||
Your PR is a fact and it'll be reviewed as soon as possible. The last step is to receive an approving review and merge it. ✅ | ||
|
||
**The final thing left to is:** | ||
- Upload a screen recoding to prove that your code works. _(without it we can't merge your PR)_ | ||
|
||
**Code quality tips:** | ||
- The keyword is **simplicity**. | ||
- Can I do it in a more simple and straightforward way? | ||
- Can I do it with less code? If so, delete what's unnecessary. | ||
- Did I over-engineer it? | ||
|
||
_Thank you for your contributuon! 👏_ |
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 |
---|---|---|
|
@@ -54,3 +54,11 @@ jobs: | |
-F "reply_to_message_id=16118" \ | ||
-F "caption=$CAPTION" \ | ||
https://api.telegram.org/bot${{ secrets.BOTFATHER_TELEGRAM_BOT_TOKEN }}/sendDocument | ||
- name: Comment APK on the PR with Danger | ||
if: github.event_name == 'pull_request' | ||
uses: danger/[email protected] | ||
with: | ||
args: "--dangerfile .danger/danger_apk.ts" | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} |
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,20 @@ | ||
name: "Danger (PR)" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
danger_pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout GIT | ||
uses: actions/checkout@v4 | ||
|
||
- name: Comment on the PR | ||
if: github.event_name == 'pull_request' | ||
uses: danger/[email protected] | ||
with: | ||
args: "--dangerfile .danger/danger_pr.ts" | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} |
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 |
---|---|---|
|
@@ -51,3 +51,12 @@ jobs: | |
name: detekt-report.html | ||
path: build/reports/detekt/detekt.html | ||
#------------------------------------------------------------------ | ||
|
||
- name: Comment Detekt results on the PR with Danger | ||
if: always() | ||
uses: danger/[email protected] | ||
with: | ||
args: "--dangerfile .danger/danger_detekt.ts" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} | ||
|
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 |
---|---|---|
|
@@ -84,4 +84,7 @@ lint/intermediates/ | |
lint/generated/ | ||
lint/outputs/ | ||
lint/tmp/ | ||
# lint/reports/ | ||
lint/reports/ | ||
|
||
# JS | ||
node_modules/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Oops, something went wrong.