nextcloud / nextcloud/nextcloud-docker-dev

[bug] Assumes all apps can be cloned from the `nextcloud` org (including suggested fix)

Open Beginner friendly
#476 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
190
Forks
103
Avg merge
4h 36m
Merged PRs (30d)
1

Description

The Music app's repo is at https://github.com/nc-music/music but the script assumes all extra apps prompted by the user are under the nextcloud org, so running ./bootstrap.sh music fails. The following is the line doing this:

https://github.com/juliusknorr/nextcloud-docker-dev/blob/0cbb0767b210e523e679fa405db639e822a07af7/bootstrap.sh#L158


Maybe supporting a list of known apps can help, this also makes it easier to contribute extra apps. For example:

function clone_app() {
  TARGET=workspace/server/apps-extra/"$1"
  if [ -d "$TARGET"/.git ]; then
    echo "🆗 App $1 is already installed." | indent
    return
  fi
  (
    echo "🌏 Fetching $1"
    (git clone ${APPS_CLONE_PARAMS[@]+"${APPS_CLONE_PARAMS[@]}"} "$2".git "$TARGET" 2>&1 | indent_cli &&
      echo "✅ $1 installed") ||
      echo "❌ Failed to install $1"
  ) | indent
}

function install_app() {
  case "$1" in
    viewer)             clone_app $1 "https://github.com/orgs/nextcloud/viewer" ;;
    recommendations)    clone_app $1 "https://github.com/orgs/nextcloud/recommendations" ;;
    files_pdfviewer)    clone_app $1 "https://github.com/orgs/nextcloud/files_pdfviewer" ;;
    profiler)           clone_app $1 "https://github.com/orgs/nextcloud/profiler" ;;
    hmr_enabler)        clone_app $1 "https://github.com/orgs/nextcloud/hmr_enabler" ;;
    circles)            clone_app $1 "https://github.com/orgs/nextcloud/circles" ;;
    globalsiteselector) clone_app $1 "https://github.com/orgs/nextcloud/globalsiteselector" ;;
    music)              clone_app $1 "https://github.com/nc-music/music" ;;
    onlyoffice)         clone_app $1 "https://github.com/ONLYOFFICE/onlyoffice-nextcloud" ;;
    *)
      cat << EOF
The '$1' app is not recognized by this script. If it is not a typo please open an issue to include it.

Valid extra apps to install:
  music
  onlyoffice
EOF
      exit 1
      ;;
  esac
}

...

for app in "${APPS_TO_INSTALL[@]}"
do
  install_app "$app"
done

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in bootstrap.sh at the linked line around 158 and trace how prompted extra apps are cloned. Run ./bootstrap.sh music before and after the change; done means the Music app is fetched from https://github.com/nc-music/music instead of being assumed to belong to the nextcloud organization.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.