This file contains hidden or 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
| import {danger, fail, message, warn, schedule} from 'danger' | |
| const reporter = require("danger-plugin-lint-report") | |
| // Scan ktlint reports | |
| schedule(reporter.scan({ | |
| fileMask: "**/reports/ktlint/*.xml", | |
| reportSeverity: true, | |
| requireLineModification: true, | |
| })) |
This file contains hidden or 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
| name: DangerJS | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| name: DangerJS | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| name: DangerJS | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| name: DangerJS | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| // Add a CHANGELOG entry for app changes | |
| const hasChangelog = danger.git.modified_files.includes("CHANGELOG.yml") | |
| if (!hasChangelog) { | |
| fail("Please add a changelog entry for your changes. :crystall_ball:") | |
| } |
This file contains hidden or 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
| interface SampleApi { | |
| @GET("fact") | |
| @Headers(TokenInterceptor.AUTHENTICATION_APP) | |
| fun getAppScopeCatFact(): Call<CatFact> | |
| @GET("fact") | |
| @Headers(TokenInterceptor.AUTHENTICATION_USER) | |
| fun getUserScopeCatFact(): Call<CatFact> | |
| } |
This file contains hidden or 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
| class TokenInterceptor: AuthenticationInterceptor(AUTHENTICATION_HEADER) { | |
| // ... | |
| companion object { | |
| const val AUTHENTICATION_HEADER = "Authentication" | |
| const val KEY_USER_TOKEN = "User Token" | |
| const val KEY_APP_TOKEN = "App Token" | |
| const val AUTHENTICATION_USER = "$AUTHENTICATION_HEADER: $KEY_USER_TOKEN" | |
| const val AUTHENTICATION_APP = "$AUTHENTICATION_HEADER: $KEY_APP_TOKEN" |
This file contains hidden or 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
| GET /secured/data HTTP/1.1 | |
| ... | |
| Authentication: Token my_super_secret_user_token | |
| ... |
This file contains hidden or 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
| GET /secured/data HTTP/1.1 | |
| ... | |
| Authentication: User Token | |
| ... |
NewerOlder