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

Update list-tags command inside customTagExamples.md #411

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

exe-r
Copy link
Contributor

@exe-r exe-r commented Jul 20, 2023

List tags runs without --

propose change from yor --list-tags > yor list-tags

yor --list-tags | echo $?
130

yor list-tags | echo $?
0

if ran with --

yor --list-tags
Incorrect Usage. flag provided but not defined: -list-tags

NAME:
   yor - enrich IaC files with tags automatically

USAGE:
   yor [global options] command [command options] [arguments...]

VERSION:
   0.1.183

DESCRIPTION:
   Yor, the IaC auto-tagger

AUTHOR:
   Bridgecrew <[email protected]>

COMMANDS:
   list-tags        List the tags yor will create if possible
   list-tag-groups  List the tag groups that will be applied by yor
   tag              apply tagging across your directory
   help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)
2023/07/20 09:28:26 [ERROR] flag provided but not defined: -list-tags

Ran without as command

yor list-tags
+------------+----------------------+--------------------------------+
|   GROUP    |       TAG KEY        |          DESCRIPTION           |
+------------+----------------------+--------------------------------+
| git        | git_org              | The entity which owns the      |
|            |                      | repository where this resource |
|            |                      | is provisioned in IaC          |
+            +----------------------+--------------------------------+
|            | git_repo             | The repository where this      |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_file             | The file (including path)      |
|            |                      | in the repository where this   |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_commit           | The hash of the latest commit  |
|            |                      | which edited this resource     |
+            +----------------------+--------------------------------+
|            | git_modifiers        | The users who modified this    |
|            |                      | resource                       |
+            +----------------------+--------------------------------+
|            | git_last_modified_at | The last time this resource's  |
|            |                      | configuration was modified     |
+            +----------------------+--------------------------------+
|            | git_last_modified_by | The last user who modified     |
|            |                      | this resource                  |
+------------+----------------------+--------------------------------+
| simple     |                      |                                |
+------------+----------------------+--------------------------------+
| external   |                      |                                |
+------------+----------------------+--------------------------------+
| code2cloud | yor_trace            | A UUID tag that allows easily  |
|            |                      | finding the root IaC config of |
|            |                      | the resource                   |
+            +----------------------+--------------------------------+
|            | yor_name             | A tag that states the resource |
|            |                      | name in the IaC config file    |
+------------+----------------------+--------------------------------+

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

List tags runs without `--` 

propose change from `yor --list-tags` > `yor list-tags`

```sh
yor --list-tags | echo $?
130

yor list-tags | echo $?
0
```

if ran with `--`

```sh
yor --list-tags
Incorrect Usage. flag provided but not defined: -list-tags

NAME:
   yor - enrich IaC files with tags automatically

USAGE:
   yor [global options] command [command options] [arguments...]

VERSION:
   0.1.183

DESCRIPTION:
   Yor, the IaC auto-tagger

AUTHOR:
   Bridgecrew <[email protected]>

COMMANDS:
   list-tags        List the tags yor will create if possible
   list-tag-groups  List the tag groups that will be applied by yor
   tag              apply tagging across your directory
   help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)
2023/07/20 09:28:26 [ERROR] flag provided but not defined: -list-tags
```

Ran without as command

```sh
yor list-tags
+------------+----------------------+--------------------------------+
|   GROUP    |       TAG KEY        |          DESCRIPTION           |
+------------+----------------------+--------------------------------+
| git        | git_org              | The entity which owns the      |
|            |                      | repository where this resource |
|            |                      | is provisioned in IaC          |
+            +----------------------+--------------------------------+
|            | git_repo             | The repository where this      |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_file             | The file (including path)      |
|            |                      | in the repository where this   |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_commit           | The hash of the latest commit  |
|            |                      | which edited this resource     |
+            +----------------------+--------------------------------+
|            | git_modifiers        | The users who modified this    |
|            |                      | resource                       |
+            +----------------------+--------------------------------+
|            | git_last_modified_at | The last time this resource's  |
|            |                      | configuration was modified     |
+            +----------------------+--------------------------------+
|            | git_last_modified_by | The last user who modified     |
|            |                      | this resource                  |
+------------+----------------------+--------------------------------+
| simple     |                      |                                |
+------------+----------------------+--------------------------------+
| external   |                      |                                |
+------------+----------------------+--------------------------------+
| code2cloud | yor_trace            | A UUID tag that allows easily  |
|            |                      | finding the root IaC config of |
|            |                      | the resource                   |
+            +----------------------+--------------------------------+
|            | yor_name             | A tag that states the resource |
|            |                      | name in the IaC config file    |
+------------+----------------------+--------------------------------+
```
@exe-r exe-r temporarily deployed to scan-security July 20, 2023 06:32 — with GitHub Actions Inactive
@gruebel
Copy link
Contributor

gruebel commented Jul 20, 2023

thanks for the contribution 🏆

@gruebel gruebel merged commit 2206ea9 into bridgecrewio:main Jul 20, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants