Patrik Ragnarsson

Results 301 comments of Patrik Ragnarsson

No answers, but I found that `#query` and `#query_values` doesn't match: ```ruby $ irb -raddressable/uri irb(main):001:0> Addressable::VERSION::STRING => "2.5.2" irb(main):002:0> Addressable::URI.parse("http://example.org?foo=%E9%23").normalize.query => "foo=%E9#" irb(main):003:0> Addressable::URI.parse("http://example.org?foo=%E9%23").normalize.query_values => {"foo"=>"\xE9#"} irb(main):004:0> Addressable::URI.unencode("%E9%23") =>...

> having a method similar to parse that would validate a URI and return a boolean value if the URI was valid instead of raising an exception This is actually...

> I think it would be better to check if `GH_PAT` is set and then use the previous way to configure `REMOTE_REPO`, so it won’t break for existing users? >...

Demonstration of the above ``` $ cat test.sh #!/bin/sh echo "TOKEN: ${GH_PAT:-$GITHUB_TOKEN}" $ ./test.sh TOKEN: $ GH_PAT=foo ./test.sh TOKEN: foo $ GITHUB_TOKEN=foo ./test.sh TOKEN: foo $ GH_PAT=bar GITHUB_TOKEN=foo ./test.sh TOKEN:...

@gr2m True, I missed that. What do you think of this? ``` $ cat test.sh #!/bin/sh set -u GITHUB_REPOSITORY="some/repo" REMOTE_REPO="https://${GH_PAT:-"x-access-token:$GITHUB_TOKEN"}@github.com/${GITHUB_REPOSITORY}.git" echo $REMOTE_REPO ``` ``` $ GITHUB_TOKEN=foo GH_PAT=bar ./test.sh https://[email protected]/some/repo.git $...

(It is `set -u` that enables the "unbound variable" message)

> I'm also unfortunately not familiar with the `x-access-token` bit. Can you explain a little bit what that does, just so we have a record here @gr2m? I'm using `x-access-token`...

The GitHub Actions docs for [GitHub token secret](https://developer.github.com/actions/managing-workflows/storing-secrets/#github-token-secret) says the `GITHUB_TOKEN` has "read/write" for [pages](https://developer.github.com/v3/apps/permissions/#permission-on-pages). With that, it looks like it is possible to use the API to [Request a...