CodeChecker-Action
CodeChecker-Action copied to clipboard
Use an appropriate *server* URL in the generated authentication file instead of a *product* URL
As reported by @RobertoFioravanti in Ericsson/CodeChecker#4025, the automatically generated .codechecker.passwords.json contains the raw product URL instead of a server URL and this makes the action rely on undocumented happenstance in CodeChecker to be able to log in:
https://github.com/whisperity/CodeChecker-Action/blob/c1fbda08799d91447c007e18db31e423ee37fccd/src/store-pre.sh#L17
It seems to work correctly by applying this regex to "$IN_STORE_URL" in store-pre.sh:
^((https?:\/\/)?([^\/]+)([\/].+))\/([^\/]+)$:
- The server url is given by
"${BASH_REMATCH[1]}". - The product is given by
"${BASH_REMATCH[5]}"}.
Credentials wold become
"${BASH_REMATCH[1]}": "$IN_STORE_USERNAME:$IN_STORE_PASSWORD".