Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@ import Danger
let danger = Danger()
let github = danger.github

// Make it more obvious that a PR is a work in progress and shouldn't be merged yet
// Make it more obvious that a PR is a work in progress and shouldn't be merged yet
if danger.github.pullRequest.title.contains("WIP") {
warn("PR is classed as Work in Progress")
}

// Warn, asking to update all README files if only English README are updated
let enReameModified = danger.git.modifiedFiles.contains { $0.contains("README.md") }
let zhReameModified = danger.git.modifiedFiles.contains { $0.contains("README_zh.md") }
let koReameModified = danger.git.modifiedFiles.contains { $0.contains("README_ko.md") }
let ptBrReameModified = danger.git.modifiedFiles.contains { $0.contains("README_pt-br.md") }
let otherLanguagesReadmeHaveBeenModified = zhReameModified && koReameModified && ptBrReameModified
let enReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README.md") }
let zhReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_zh.md") }
let koReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_ko.md") }
let ptBrReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_pt-br.md") }
let trReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_tr.md") }
let frReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_fr.md") }
let deReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_de.md") }
let esReadmeModified = danger.git.modifiedFiles.contains { $0.contains("README_es.md") }

if (enReameModified && !otherLanguagesReadmeHaveBeenModified) {
let otherLanguagesReadmeHaveBeenModified =
zhReadmeModified && koReadmeModified && ptBrReadmeModified && trReadmeModified
&& frReadmeModified && deReadmeModified && esReadmeModified

if enReameModified && !otherLanguagesReadmeHaveBeenModified {
warn("Consider **also** updating the README for other languages.")
}

Expand All @@ -26,8 +33,12 @@ if (danger.github.pullRequest.additions ?? 0) > 500 {

// Added (or removed) library files need to be added (or removed) from the
// Xcode project to avoid breaking things.
let addedSwiftLibraryFiles = danger.git.createdFiles.contains { $0.fileType == .swift && $0.hasPrefix("Sources") }
let deletedSwiftLibraryFiles = danger.git.deletedFiles.contains { $0.fileType == .swift && $0.hasPrefix("Sources") }
let addedSwiftLibraryFiles = danger.git.createdFiles.contains {
$0.fileType == .swift && $0.hasPrefix("Sources")
}
let deletedSwiftLibraryFiles = danger.git.deletedFiles.contains {
$0.fileType == .swift && $0.hasPrefix("Sources")
}
let modifiedXcodeProject = danger.git.modifiedFiles.contains { $0.contains(".xcodeproj") }
if (addedSwiftLibraryFiles || deletedSwiftLibraryFiles) && !modifiedXcodeProject {
fail("Added or removed files require the Xcode project to be updated.")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
• <a href="#️-contributing">Contributing</a>
</p>

**🌎 README is available in other languages: [🇪🇸](Translations/README_es.md) . [🇨🇳](Translations/README_zh.md) . [🇧🇷](Translations/README_pt-br.md) . [🇰🇷](Translations/README_ko.md) . [🇫🇷](Translations/README_fr.md) . [🇩🇪](Translations/README_de.md)**
**🌎 README is available in other languages: [🇪🇸](Translations/README_es.md) . [🇨🇳](Translations/README_zh.md) . [🇧🇷](Translations/README_pt-br.md) . [🇰🇷](Translations/README_ko.md) . [🇫🇷](Translations/README_fr.md) . [🇩🇪](Translations/README_de.md) . [🇹🇷](Translations/README_tr.md)**

Today almost all apps have async processes, such as API requests, long running processes, etc. While the processes are working, usually developers place a loading view to show users that something is going on.

Expand Down
2 changes: 1 addition & 1 deletion Translations/README_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
• <a href="#️-beitragen">Beitragen</a>
</p>

**🌎 README ist auch in anderen Sprachen verfügbar: [🇬🇧](../README.md) . [🇪🇸](README_es.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md)**
**🌎 README ist auch in anderen Sprachen verfügbar: [🇬🇧](../README.md) . [🇪🇸](README_es.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇹🇷](README_tr.md)**

Heutzutage haben fast alle Anwendungen async-Prozesse, z.B. API-Anfragen, lang laufende Prozesse, usw. Während die Prozesse arbeiten, platzieren die Entwickler in der Regel eine Ladeansicht, um den Benutzern zu zeigen, dass im Hintergrund etwas vor sich geht.

Expand Down
2 changes: 1 addition & 1 deletion Translations/README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
• <a href="#️-contribuir">Contribuir</a>
</p>

**🌎 README está disponible en estos idiomas: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md)**
**🌎 README está disponible en estos idiomas: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md) . [🇹🇷](README_tr.md)**

Hoy en día, La mayoría de las apps tiene procesos asíncronos, como peticiones a una API, procesos que tardan mucho tiempo, etc. Mientras estos procesos se están ejecutando, se suele mostrar un aburrido spinner indicando que algo está pasando.

Expand Down
2 changes: 1 addition & 1 deletion Translations/README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</p>


**🌎 Traductions: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md)**
**🌎 Traductions: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md) . [🇹🇷](README_tr.md)**

Aujourd'hui, presque toutes les applications ont des processus asynchrones, tels que les requêtes Api, les processus de longue durée, etc. Et pendant que les processus fonctionnent, les développeurs affichent généralement une vue de chargement pour montrer aux utilisateurs que quelque chose se passe.

Expand Down
2 changes: 1 addition & 1 deletion Translations/README_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</a>
</p>

**🌎 번역에 도움을 주신분들: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md)**
**🌎 번역에 도움을 주신분들: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md) . [🇹🇷](README_tr.md)**

오늘날 거의 대부분의 앱들은 비동기 방식의 API 호출을 사용하는 프로세스를 가지고 있습니다.
프로세스가 작동하는동안 개발자들은 작업이 실행되고 있다는것을 사용자들에게 보여주기 위해서 로딩 뷰를 배치합니다.
Expand Down
2 changes: 1 addition & 1 deletion Translations/README_pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</a>
</p>

**🌎 Traduções: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md)**
**🌎 Traduções: [🇬🇧](../README.md) . [🇨🇳](README_zh.md) . [🇧🇷](README_pt-br.md) . [🇰🇷](README_ko.md) . [🇫🇷](README_fr.md) . [🇩🇪](README_de.md) . [🇹🇷](README_tr.md)**

Hoje, quase todos os apps têm processos assíncronos, como requisições de API, processos longos, etc. E enquanto os processos estão ocorrendo, normalmente os desenvolvedores usam uma view que mostra os usuarios que algo está ocorrendo.

Expand Down
Loading
Loading