View okhttp-silent-retry.kt
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
import okhttp3.logging.HttpLoggingInterceptor | |
import okhttp3.mockwebserver.MockResponse | |
import okhttp3.mockwebserver.MockWebServer | |
import okhttp3.mockwebserver.SocketPolicy | |
import org.junit.Assert.assertThat | |
import kotlin.test.assertEquals | |
fun main() { |
View pre-commit
#!/usr/bin/env bash | |
LC_ALL=C | |
local_branch="$(git rev-parse --abbrev-ref HEAD)" | |
valid_branch_regex="^(feature|bugfix|improvement|library|prerelease|release|hotfix)\/[a-z0-9._-]+$" | |
message="There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again." | |
if [[ ! $local_branch =~ $valid_branch_regex ]] |