christianspecht / scm-backup

Makes offline backups of your cloud hosted source code repositories
https://scm-backup.org/
GNU General Public License v3.0
58 stars 20 forks source link

Misleading warning backing up a seperate workspace in bitbucket #68

Closed exptom closed 2 years ago

exptom commented 2 years ago

My bitbucket account has access to a number of workspaces. I followed the docs that state:

By default, a user’s workspace ID is equal to the user name, but it’s possible to change the workspace ID, so workspace ID and user name don’t match anymore.

In this case, you need to set name to the workspace ID and authName to the user name.

and this works well.

However this warning is shown:

: AuthName and Name must be equal for hoster bitbucket. If they are different, SCM Backup will backup public repositories only! </blockquote> <p>This is untrue as all the repos in the workspace are private and they have been backed up.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/christianspecht"><img src="https://avatars.githubusercontent.com/u/263372?v=4" />christianspecht</a> commented <strong> 2 years ago</strong> </div> <div class="markdown-body"> <p>Makes sense.<br /> However, I didn't use Bitbucket that much since they replaced teams by workspaces, so I'm not sure if the solution I have in mind is the best one.</p> <hr /> <p>Here are my thoughts:</p> <ol> <li> <p><a href="https://docs.scm-backup.org/en/latest/config-bitbucket.html#sources">This section on the same page</a> in the docs also states:</p> <blockquote> <p>The <code>type</code> property of the source doesn't matter anymore <em>(because for what SCM Backup does, there's no difference between users and workspaces)</em>, so SCM Backup will accept either <code>user</code> or <code>org</code></p> </blockquote> </li> <li> <p>The misleading warning <a href="https://github.com/christianspecht/scm-backup/blob/6090ea951f806bedc43643700b9cf950e9664bd8/src/ScmBackup/Hosters/ConfigSourceValidatorBase.cs#L56">is generated here</a>, and the whole check is only done if the <code>type</code> of the source is not <code>org</code>.</p> </li> <li> <p>If your user has access to multiple workspaces, they are probably more like the previous "teams" (and not your user's "personal" workspace). </p> </li> </ol> <p><strong>So IMO this is more of a documentation issue - I should probably replace the "The <code>type</code> property of the source doesn't matter anymore..." section by an explanation that you need to set the <code>type</code> of the source to <code>org</code> if the workspace is not your user's personal workspace.<br /> Do you agree?</strong></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/exptom"><img src="https://avatars.githubusercontent.com/u/4302032?v=4" />exptom</a> commented <strong> 2 years ago</strong> </div> <div class="markdown-body"> <p>Yes, that makes sense. I changed the type to <code>org</code> for the workspace that was generating the warning and it has now disappeared.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>