-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add requester pays samples #453
Conversation
Codecov Report
@@ Coverage Diff @@
## master #453 +/- ##
=======================================
Coverage 83.84% 83.84%
=======================================
Files 4 4
Lines 421 421
=======================================
Hits 353 353
Misses 68 68 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but you need to add the samples to package.json and then re-generate the readme
Done - FYI, I wasn't sure whether or not this sample warranted a |
storage/README.md
Outdated
Examples: | ||
node requesterPays.js enable my-bucket Enables requester-pays requests on a bucket named | ||
"my-bucket". | ||
node requesterPays.js list Disables requester-pays requests on a bucket named |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be disable? I think the README didn't generate correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 😄 - good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up Ace! I added two comments. I'll approve after the README is fixed.
let status; | ||
const metadata = data[0]; | ||
if (metadata && metadata.billing && metadata.billing.requesterPays) { | ||
status = `enabled`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this string use single-quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, the other strings should use backticks. Will fix.
storage/requesterPays.js
Outdated
@@ -177,8 +177,8 @@ const cli = require(`yargs`) | |||
(opts) => downloadFileUsingRequesterPays(opts.projectId, opts.bucketName, opts.srcFileName, opts.destFileName) | |||
) | |||
.example(`node $0 enable my-bucket`, `Enables requester-pays requests on a bucket named "my-bucket".`) | |||
.example(`node $0 list`, `Disables requester-pays requests on a bucket named "my-bucket".`) | |||
.example(`node $0 delete my-bucket`, `Determines whether requester-pays requests are enabled for a bucket named "my-bucket".`) | |||
.example(`node $0 disable`, `Disables requester-pays requests on a bucket named "my-bucket".`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit, disable should accept a bucket id similar to enable.
* chore(main): release 3.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 3.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 3.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 3.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
No description provided.