Closed JuliaJakubcova closed 1 year ago
Issue: https://github.com/touchlab/KMMBridge/issues/54
Passing in the whole url, or presumably just the repo and not owner, will result in weird error messages.
The goal is to improve error messaging when an invalid value is passed which informs them that the input must be "Owner/Repo"
Added regex check for valid options for setting a github repo (such as url and ssh path), if regex is not matched, exception is thrown.
Tested in KmmBridgeKickStart app by calling ./gradlew kmmBridgePublish -PGITHUB_PUBLISH_TOKEN="$MY_TOKEN" -PGITHUB_REPO="https://github.com/touchlab/KMMBridgeKockStart.git" -PGITHUB_PUBLISH_USER="Touchlab-Bot" --no-daemon --stacktrace
./gradlew kmmBridgePublish -PGITHUB_PUBLISH_TOKEN="$MY_TOKEN" -PGITHUB_REPO="https://github.com/touchlab/KMMBridgeKockStart.git" -PGITHUB_PUBLISH_USER="Touchlab-Bot" --no-daemon --stacktrace
Issue: https://github.com/touchlab/KMMBridge/issues/54
Summary
Passing in the whole url, or presumably just the repo and not owner, will result in weird error messages.
The goal is to improve error messaging when an invalid value is passed which informs them that the input must be "Owner/Repo"
Fix
Added regex check for valid options for setting a github repo (such as url and ssh path), if regex is not matched, exception is thrown.
Testing
Tested in KmmBridgeKickStart app by calling
./gradlew kmmBridgePublish -PGITHUB_PUBLISH_TOKEN="$MY_TOKEN" -PGITHUB_REPO="https://github.com/touchlab/KMMBridgeKockStart.git" -PGITHUB_PUBLISH_USER="Touchlab-Bot" --no-daemon --stacktrace