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

RepositoryException: Pull request failed: Validation Failed: {'resource': 'PullRequest', 'field': 'head', 'code': 'inv... #5932

Closed
sentry-io bot opened this issue Apr 27, 2021 · 3 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 27, 2021

This happens when Weblate repository configuration is changed. Weblate doesn't update its fork, and it stays on the old repository causing all pull requests to fail.

We should probably check for such errors and recreate the fork in such case.

Sentry Issue: WEBLATE-6GN

RepositoryException: Pull request failed: Validation Failed: {'resource': 'PullRequest', 'field': 'head', 'code': 'invalid'}
  File "weblate/trans/models/component.py", line 1369, in push_repo
    self.repository.push(self.push_branch)
  File "weblate/vcs/git.py", line 721, in push
    self.create_pull_request(credentials, self.branch, fork_remote, fork_branch)
  File "weblate/vcs/git.py", line 833, in create_pull_request
    raise RepositoryException(0, f"Pull request failed: {error_message}")
@sentry-io
Copy link
Author

sentry-io bot commented Apr 27, 2021

Sentry issue: WEBLATE-52K

@sentry-io
Copy link
Author

sentry-io bot commented Apr 27, 2021

Sentry issue: WEBLATE-5MR

@nijel nijel added this to the 4.7 milestone Apr 27, 2021
@nijel nijel self-assigned this Apr 29, 2021
@nijel nijel added the bug Something is broken. label Apr 29, 2021
@nijel nijel closed this as completed in 4185790 Apr 29, 2021
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@nijel nijel modified the milestones: 4.7, 4.6.1 Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

1 participant