(targetNode *yaml.Node)
| 106 | } |
| 107 | |
| 108 | func ensureSampleOrgs(targetNode *yaml.Node) bool { |
| 109 | _, modified := targetNode.EnsureKey( |
| 110 | "orgs", |
| 111 | yaml.NewMappingNode(), |
| 112 | &yaml.EnsureOptions{ |
| 113 | Comment: ` |
| 114 | Org repos are accessible at @org-name/repo. Note that if admins is not |
| 115 | specified, the only users with admin access will be global admins. By |
| 116 | default, all members of an org will have read-write access to repos. This |
| 117 | can be changed with the read and write keys. |
| 118 | # |
| 119 | Sample org (with all options set): |
| 120 | # |
| 121 | vault: |
| 122 | admins: |
| 123 | - belak |
| 124 | write: |
| 125 | - some user |
| 126 | read: |
| 127 | - some-other-user |
| 128 | repos: |
| 129 | project-name-here: |
| 130 | public: false |
| 131 | write: |
| 132 | - belak |
| 133 | read: |
| 134 | - some-user |
| 135 | - some-other-user`, |
| 136 | }, |
| 137 | ) |
| 138 | |
| 139 | return modified |
| 140 | } |
| 141 | |
| 142 | // NOTE: this would make more sense as a map, but we want to keep the order. |
| 143 | var sampleOptions = []struct { |
no test coverage detected