Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get Github's Pull Request to work #4680

Closed
doums opened this issue Oct 12, 2020 · 10 comments
Closed

Unable to get Github's Pull Request to work #4680

doums opened this issue Oct 12, 2020 · 10 comments
Labels
question This is more a question for the support than an issue.

Comments

@doums
Copy link

doums commented Oct 12, 2020

Hi,

I'm trying to setup Weblate to create Pull Request on push.
Note that direct push and pulls works fine.
The first problem I encounter is a contradiction between what is in the documentation and what I actually have in my current weblate instance (local container):

In case you do not want direct pushes by Weblate, there is support for GitHub, GitLab pull requests or Gerrit reviews, you can activate these by choosing GitHub, GitLab or Gerrit as Version control system in Component configuration.

doc

But in my weblate app, under Version control system, "GitHub" is not present. This is the first problem.

Here is the environment part of my docker-compose.yml

    environment:
      POSTGRES_DATABASE: postgres
      POSTGRES_HOST: postgres
      POSTGRES_PASSWORD: weblate
      POSTGRES_PORT: 5432
      POSTGRES_USER: weblate
      REDIS_HOST: redis
      REDIS_PORT: 6379
      WEBLATE_ADMIN_EMAIL: xxx.admin@example.com
      WEBLATE_ADMIN_NAME: admin
      WEBLATE_ADMIN_PASSWORD: admin
      WEBLATE_ALLOWED_HOSTS: "*"
      WEBLATE_DEFAULT_FROM_EMAIL: xxx@example.com
      WEBLATE_LOGLEVEL: DEBUG #dev only
      WEBLATE_REGISTRATION_OPEN: 0
      WEBLATE_SERVER_EMAIL: xxx@example.com
      WEBLATE_SITE_DOMAIN: xxx.example.com
      VCS_CLONE_DEPTH: 0
      GITHUB_TOKEN: xxxxx
@doums doums added the question This is more a question for the support than an issue. label Oct 12, 2020
@github-actions
Copy link

This issue looks like a support question. We try to answer these reasonably fast, but in case you are looking for faster resolution, please consider purchasing support subscription and make Weblate stronger.

@nijel
Copy link
Member

nijel commented Oct 13, 2020

Configuring hub is not supported in the Docker container WeblateOrg/docker#726. In the upcoming Weblate 4.3 release we will be using the API directly and the configuration will work there. You can try right now by using bleeding tag.

The variables will be named differently there, see https://docs.weblate.org/en/latest/admin/install/docker.html#envvar-WEBLATE_GITHUB_USERNAME

@doums
Copy link
Author

doums commented Oct 13, 2020

Why this is not present in the documentation about the docker version (if I'm not mistaken) ?
This must be present in the doc. We are talking about the fact that Github's PR are not supported in the current docker stable version while the whole doc assumes it is. This is a big point. In my case I lost several hours until you told me that..

@nijel
Copy link
Member

nijel commented Oct 13, 2020

They are supported, you just need to configure hub manually, see https://docs.weblate.org/en/weblate-4.2.2/vcs.html#hub-setup. This is same as with the non-Dockerized version, so there was no difference to mention in the Docker docs.

Somebody has contributed automation of this for GitLab in WeblateOrg/docker#489 and nobody did that for GitHub (see WeblateOrg/docker#726).

@doums
Copy link
Author

doums commented Oct 13, 2020

If I understand, in my case, I have to modify the Dockerfile of weblate to install hub ?
If yes, if I have to modify myself the Dockerfile to be able to use a particular feature, is the same as this feature is not supported (currently) by the Weblate dockerized version.
And logically this require some mention in the related documentation.

@nijel
Copy link
Member

nijel commented Oct 13, 2020

If I understand, in my case, I have to modify the Dockerfile of weblate to install hub ?

No, hub is installed, you just have to configure it. No changes to Dockerfile needed.

And logically this require some mention in the related documentation.

Patches are always welcome. As we're discussing code which has been already rewritten for upcoming release (which is about to happen this week), there are definitely more useful things to do than this.

@doums
Copy link
Author

doums commented Oct 13, 2020

in the doc you linked :

Pushing changes to GitHub as pull requests requires a configured hub installation on your server. Follow the installation instructions at...

it's confusing, because when I read this, I understand I have to install hub. But never mind.

Ok good to know.
As the release is about to happen this week, can I expect the same for the docker image ?

Thanks for your answers.

@nijel
Copy link
Member

nijel commented Oct 13, 2020

Yes, the Docker image is usually ready within hours after the release.

@doums
Copy link
Author

doums commented Oct 13, 2020

Okay thank.

@doums doums closed this as completed Oct 13, 2020
@github-actions
Copy link

The issue you have reported seems to be resolved now.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants