Problem/Motivation

Empty Repository

No code is available for Image field to media. File an issue or contact a maintainer if you have questions.

Occurring on (at least) https://www.drupal.org/project/image_field_to_media/git-instructions

(This page is linked to from the help text after creating a fork for an issue.)

The code does exist though: https://git.drupalcode.org/project/image_field_to_media

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mlncn created an issue. See original summary.

drumm’s picture

Project: Drupal.org infrastructure » Project Git instructions
Version: » 7.x-1.x-dev
Component: Git » Instructions
Related issues: +#3298462: Remove/replace versioncontrol label use

This 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:

  • Update the instructions to be the same regardless of repository content and releases.
  • Update the “empty” instructions to also mention that a dev release should be made.

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

You will be prompted to enter your Drupal.org password

mlncn’s picture

Priority: Normal » Major

LOL 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!

drumm’s picture

"Empty repository" text should only be shown if the repository is actually empty.

That 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.

mlncn’s picture

Was 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.

drumm’s picture

Yes, 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.

  • drumm committed 444a47c on 7.x-1.x
    Issue #3300976: Simplify and correct Git instructions
    
drumm’s picture

The 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.

joachim’s picture

> 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.

fjgarlin made their first commit to this issue’s fork.

fjgarlin’s picture

Status: Active » Needs review

There 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...

  • drumm committed 01f6973 on 7.x-1.x authored by fjgarlin
    Issue #3300976: Incorrect message of empty repository
    
drumm’s picture

Status: Needs review » Fixed

The initial instructions are now updated to go all the way through creating the first dev release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.