Closed (fixed)
Project:
Project Git instructions
Version:
7.x-1.x-dev
Component:
Instructions
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2022 at 15:31 UTC
Updated:
1 Dec 2022 at 21:09 UTC
Jump to comment: Most recent
Comments
Comment #2
drummThis is a regression caused by #3298462: Remove/replace versioncontrol label use. The empty repository check was replaced by a “has releases” check. We could either:
I personally favor having the instructions be the same all the time, mostly because the code will be straightforward. And there are now general projects on Drupal.org, which it might not make sense to make releases for.
This needs copyediting to decide what text should be added and where. The old “empty” instructions actually have some bad, inaccurate advice
Comment #3
mlncn commentedLOL this bit me again, this time https://www.drupal.org/project/drutopia_microblog/git-instructions had the version presented to module maintainers for starting a project, and caused me to follow the instructions and start a new repository when in fact i had already started one.
So the fix needs to account for people who maintain the module as well as people who are trying to use a dev version / contribute to one.
If i follow correctly i am very much in favor of option one, "Update the instructions to be the same regardless of repository content and releases."
Whether there is actually code there or not is important for people going to the version control tab. Releases are important for people using composer normally or otherwise checking out the module for use, and that is covered elsewhere.
Seems very straightforward that the standard version control text should be shown regardless of whether a release has been made, and "Empty repository" text should only be shown if the repository is actually empty. We can workshop the text on these empty repository pages in a separate issue, but first priority is not showing the text when it shouldn't be shown at all!
Comment #4
drummThat is not something we can do, #3248795: Reduce Drupal.org coupling to GitLab on git.drupalcode.org is removing the DB tables we might query to know what, if anything, is in the project’s Git repository.
We have to just display the same instructions regardless of what is in the repository.
Comment #5
mlncn commentedWas coming here to type: Or we should be linking off to git.drupalcode.org for each project and letting people go from there?
So, yeah, definitely, we should just link directly to the project on git.drupalcode.org since only it knows.
Comment #6
drummYes, just removing the Git instructions has crossed my mind. We don’t really need to tell people how to use Git nowadays, people already know or there are other resources. There is some Drupal-specific information and conventions in there, so it would be a bit of a bigger task to review all of it for removal.
Comment #9
drummThe MR/commit so far does not resolve this, it is just a cleanup of code that’s no longer really needed, and a couple things that were outdated and bad advice. So actually doing the work should be easier.
We could add instructions for creating a dev release to the “empty” page. However, that would not make sense for sandboxes or general projects, where a release may never be made.
I think we should make the instructions the same, regardless of repository/release state.
Comment #10
joachim commented> We don’t really need to tell people how to use Git nowadays, people already know or there are other resources.
They're really useful!
I consider myself to be pretty knowledgeable about git, but I still find it really useful to have these instructions to copy-paste from.
Comment #13
fjgarlin commentedThere was a regression in the case where the user is not a maintainer and the project does have code but not releases.
I think I've simplified the logic a bit. Maintainers have two possibilities now, depending on whether the repo has versions or not, and non-maintainers just have the default git instructions, regardless of whether there are versions or not in the repo.
See the new branch/MR created for this.
This is deployed in this development copy in case you want to test: https://fjgarlin-drupal.dev.devdrupal.org/project/project_git_instructio...
Comment #15
drummThe initial instructions are now updated to go all the way through creating the first dev release.