Skip to content
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

aws-secretsmanager: add page #6131

Merged
merged 2 commits into from Jun 18, 2021
Merged

Conversation

258204
Copy link
Collaborator

@258204 258204 commented Jun 16, 2021

  • The page (if new), does not already exist in the repo.
  • The page is in the correct platform directory (common/, linux/, etc.)
  • The page has 8 or fewer examples.
  • The PR title conforms to the recommended templates.
  • The page follows the content guidelines.
  • The page description includes a link to documentation or a homepage (if applicable).

For #5653

pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
@CleanMachine1 CleanMachine1 changed the title aws-secretsmanager: new feature aws-secretsmanager: add page Jun 16, 2021
@CleanMachine1 CleanMachine1 added the new command Issues requesting creation of a new page. label Jun 16, 2021
@CleanMachine1
Copy link
Member

{{commit_message}}

Creative 😄

@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

{{commit_message}}

Creative

Accidentally pasted the newline when I was pasting the command, so it took the default name.

Copy link
Contributor

@bl-ue bl-ue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good @258204 — I have a few little comments.

pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

Fair warning, depending on what tier you are in, a secret costs $0.40 a month. So be careful with testing.

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

Yeah, AWS can get costly. But only can — a lot of services have a free tier (e.g. CodeCommit).

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

Accidentally pasted the newline when I was pasting the command, so it took the default name.

Ah, you used tldr git commit?

  • Auto stage all modified files and commit with a message:
    git commit -a -m "{{message}}"

I recommend using the official Node.js client. It intercepts {{ and }} and replaces them with nice (configurable) colors and styles. Here's mine:

Screen Shot 2021-06-16 at 11 28 24 AM

(happy to share my theme and tldr config if any wants it ;)

@CleanMachine1
Copy link
Member

I'd just like to say you could easily change the message through

git rebase -i HEAD~10
then change the message here

pick hash {{edit message here}}

However @bl-ue could you just confirm this is correct procedure

@CleanMachine1
Copy link
Member

Accidentally pasted the newline when I was pasting the command, so it took the default name.

Ah, you used tldr git commit?

  • Auto stage all modified files and commit with a message:
    git commit -a -m "{{message}}"

I recommend using the official Node.js client. It intercepts {{ and }} and replaces them with nice (configurable) colors and styles. Here's mine:

Screen Shot 2021-06-16 at 11 28 24 AM

(happy to share my theme and tldr config if any wants it ;)

python client does the same

git commit -m "message"

I don't know if you can change the color though, I couldn't see how

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

I'd just like to say you could easily change the message through

git rebase -i HEAD~10
then change the message here

pick hash {{edit message here}}

However @bl-ue could you just confirm this is correct procedure

Umm, no, you need to use reword not pick, and the message is just for guidance, it's not actually used, so reword e1a40e0 and then edit the message in the editor that opens.

But, an even easier method (if the comment that you want to edit the message of is the latest one), is git commit --amend -m "new message goes here".

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

python client does the same
I don't know if you can change the color though, I couldn't see how

https://github.com/tldr-pages/tldr-python-client#configuration

pages/common/aws-secretsmanager.md Outdated Show resolved Hide resolved
pages/common/aws-secretsmanager.md Show resolved Hide resolved
@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

I'd just like to say you could easily change the message through

git rebase -i HEAD~10
then change the message here

pick hash {{edit message here}}

However @bl-ue could you just confirm this is correct procedure

Thanks this is quite useful. I should have applied this. When I push to github it merges back to {{edit message here}}

Update pages/common/aws-secretsmanager.md

Co-authored-by: Axel Navarro <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>

Update pages/common/aws-secretsmanager.md

Co-authored-by: bl-ue <[email protected]>
@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

When doing anything with commits that isn't just adding them (e.g. modifying commits, removing commits), you need to force-push git push --force.

The workflow would look like this:

$ git rebase -i HEAD~8
pick e1a40e04 {{commit_message}}
pick 83189fe9 Update pages/common/aws-secretsmanager.md
pick 95e5d448 Update pages/common/aws-secretsmanager.md
pick b185f25f Update pages/common/aws-secretsmanager.md
pick a5791228 Update pages/common/aws-secretsmanager.md
pick 16967805 Update pages/common/aws-secretsmanager.md
pick 46657cd0 Update pages/common/aws-secretsmanager.md
pick f763d2aa Update pages/common/aws-secretsmanager.md

then you change all of the picks (except the first) to squash, to squash them all together into the first commit, and then change the first pick to reword, so that after the squashing you can change the first commit's message, like this:

reword e1a40e04 {{commit_message}}
squash 83189fe9 Update pages/common/aws-secretsmanager.md
squash 95e5d448 Update pages/common/aws-secretsmanager.md
squash b185f25f Update pages/common/aws-secretsmanager.md
squash a5791228 Update pages/common/aws-secretsmanager.md
squash 16967805 Update pages/common/aws-secretsmanager.md
squash 46657cd0 Update pages/common/aws-secretsmanager.md
squash f763d2aa Update pages/common/aws-secretsmanager.md
Before that, the commmits for this branch look like this:
commit f763d2aaa79016c650f9410a5dfd01ec4af37aaa (HEAD -> aws-secretsmanager)
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:31 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 46657cd0fe4b3237ab4ccd25bada261830659ed5
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:14 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 169678057ce86bbcd8d5660a688ea7b607fe5d59
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:08 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit a5791228e34300910e9824de842e4850425131a8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:41 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit b185f25fb57663222cc45dfa2194678b614a84ec
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:28 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 95e5d4488761c4adb79dc0debbea09634821ffc8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:10 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 83189fe92de08e548bf2109bb86534c9417b4ec8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:53:32 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: Axel Navarro <[email protected]>

commit e1a40e04840d891c0486e31ca34ce6ea0b4e5eb1
Author: 258204 <[email protected]>
Date:   Wed Jun 16 09:15:30 2021 -0600

    {{commit_message}}
Now, it looks like this
commit 982948272e9e8475b9f86d0e8a89c30e9d12478f (HEAD -> aws-secretsmanager)
Author: 258204 <[email protected]>
Date:   Wed Jun 16 09:15:30 2021 -0600

    New message goes here
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: Axel Navarro <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>
    
    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

After you finish the rebase, and it opens the editor for you to enter your reword, it opens the editor again, this time to edit the message for the squashed commit. I chose to leave all of the commits' messages in the final commit, but you don't have to if you don't want to.

You can do all of this right now, if you'd like. The page will stay intact 🙂

(if you mess anything up, I've got both versions of the branches locally for backup ;)

@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

When doing anything with commits that isn't just adding them (e.g. modifying commits, removing commits), you need to force-push git push --force.

The workflow would look like this:

$ git rebase -i HEAD~8
pick e1a40e04 {{commit_message}}
pick 83189fe9 Update pages/common/aws-secretsmanager.md
pick 95e5d448 Update pages/common/aws-secretsmanager.md
pick b185f25f Update pages/common/aws-secretsmanager.md
pick a5791228 Update pages/common/aws-secretsmanager.md
pick 16967805 Update pages/common/aws-secretsmanager.md
pick 46657cd0 Update pages/common/aws-secretsmanager.md
pick f763d2aa Update pages/common/aws-secretsmanager.md

then you change all of the picks (except the first) to squash, to squash them all together into the first commit, and then change the first pick to reword, so that after the squashing you can change the first commit's message, like this:

reword e1a40e04 {{commit_message}}
squash 83189fe9 Update pages/common/aws-secretsmanager.md
squash 95e5d448 Update pages/common/aws-secretsmanager.md
squash b185f25f Update pages/common/aws-secretsmanager.md
squash a5791228 Update pages/common/aws-secretsmanager.md
squash 16967805 Update pages/common/aws-secretsmanager.md
squash 46657cd0 Update pages/common/aws-secretsmanager.md
squash f763d2aa Update pages/common/aws-secretsmanager.md

Before that, the commmits for this branch look like this:

commit f763d2aaa79016c650f9410a5dfd01ec4af37aaa (HEAD -> aws-secretsmanager)
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:31 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 46657cd0fe4b3237ab4ccd25bada261830659ed5
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:14 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 169678057ce86bbcd8d5660a688ea7b607fe5d59
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:58:08 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit a5791228e34300910e9824de842e4850425131a8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:41 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit b185f25fb57663222cc45dfa2194678b614a84ec
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:28 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 95e5d4488761c4adb79dc0debbea09634821ffc8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:57:10 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: bl-ue <[email protected]>

commit 83189fe92de08e548bf2109bb86534c9417b4ec8
Author: 258204 <[email protected]>
Date:   Thu Jun 17 00:53:32 2021 +0930

    Update pages/common/aws-secretsmanager.md
    
    Co-authored-by: Axel Navarro <[email protected]>

commit e1a40e04840d891c0486e31ca34ce6ea0b4e5eb1
Author: 258204 <[email protected]>
Date:   Wed Jun 16 09:15:30 2021 -0600

    {{commit_message}}

Now, it looks like this
After you finish the rebase, and it opens the editor for you to enter your reword, it opens the editor again, this time to edit the message for the squashed commit. I chose to leave all of the commits' messages in the final commit, but you don't have to if you don't want to.

You can do all of this right now, if you'd like. The page will stay intact

(if you mess anything up, I've got both versions of the branches locally for backup ;)

Thank you so much :D. This clearer than all the other instructions for re-basing I could find.

@tldr-bot
Copy link

The build for this PR failed with the following error(s):

pages/common/aws-secretsmanager.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "<<<<<<< HEAD"]
pages/common/aws-secretsmanager.md:2 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# aws secretsmanager"]
pages/common/aws-secretsmanager.md:4 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# aws-secretsmanager"]
pages/common/aws-secretsmanager.md:11 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Show secrets stored by the s..."]
pages/common/aws-secretsmanager.md:13 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Show secrets stored by secre..."]
pages/common/aws-secretsmanager.md:28 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- View details of a secret exc..."]
pages/common/aws-secretsmanager.md:43 MD003/heading-style/header-style Heading style [Expected: atx; Actual: setext]
pages/common/aws-secretsmanager.md:43 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "`aws secretsmanager rotate-secret --secret-id {{name_or_arn}} --rotation-lambda-arn {{arn_of_lambda_function}} --rotation-rules AutomaticallyAfterDays={{30}}`"]
pages/common/aws-secretsmanager.md:45 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- View details of secret excep..."]
pages/common/aws-secretsmanager.md:47 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- View details of a secret exc..."]
pages/common/aws-secretsmanager.md:53 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "======="]
pages/common/aws-secretsmanager.md:
Error: Parse error on line 2:
<<<<<<< HEAD# aws secretsmanager
------------^
Expecting 'NEWLINE', 'GREATER_THAN', got 'HASH'

Please fix the error(s) and push again.

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

whoa, lot of conflicts there. Need help fixing them?

@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

whoa, lot of conflicts there. Need help fixing them?

yes please

@258204
Copy link
Collaborator Author

258204 commented Jun 16, 2021

This gives new meaning to the term spagetti code.

@bl-ue
Copy link
Contributor

bl-ue commented Jun 16, 2021

Done — looks like you just had some merge conflict due to forgetting to push/pull/force-push or something on that score.

@bl-ue bl-ue mentioned this pull request Jun 16, 2021
@258204 258204 requested review from bl-ue and navarroaxel June 17, 2021 11:31
@mfrw mfrw merged commit 99b5b6d into tldr-pages:main Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Issues requesting creation of a new page.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants