leetcode-cli icon indicating copy to clipboard operation
leetcode-cli copied to clipboard

Add CI for command pick and test

Open clearloop opened this issue 1 year ago • 2 comments

hmmm, need to set the csrf token and session key to the env of CI

This may require loading csrf and session from env

clearloop avatar Jun 24 '23 02:06 clearloop

You can set GH Actions secrets, then write those into a config file, and read them. I assume they won't be obtainable from outside. The problem is that they could expire.

anstadnik avatar Jun 25 '23 08:06 anstadnik

yeah, it is possible to replace the new generated csrf and session key with bash script as well!

./target/release/leetcode list # just trigger the config generation logic
sed -i /csrf=\"\"/csrf=\"...\"/ ~/.leetcode/leetcode.toml 
sed -i /session=\"\"/session=\"...\"/ ~/.leetcode/leetcode.toml 
cp anwser.1-sum-two.rs > ~/.leetcode/code
leetcode t 1

clearloop avatar Jun 25 '23 14:06 clearloop