Skip to content

feat(vcs): configure labels and assignees on GitHub pull requests - #22383

Merged
nijel merged 2 commits into
WeblateOrg:mainfrom
amCap1712:configurable-pull-requests
Oct 28, 2026
Merged

nijel merged 2 commits into
WeblateOrg:mainfrom
amCap1712:configurable-pull-requests

Conversation

@amCap1712

Copy link
Copy Markdown
Contributor

Add three GitHub version control parameters: a pull request assignee, assigning the GitHub account linked to the user who started the push, and comma-separated labels. Weblate adds the configured values that are missing whenever it creates or updates its pull request.

The acting user is only assigned to new pull requests, so pushes to an open pull request do not pile up assignees. GitHub silently ignores users without repository access, which is expected for translators, so only a configured assignee being ignored is reported. Failures raise a PullRequestUpdateFailure alert instead of failing the push, because the pull request already exists at that point.

The settings tab links rendered by crispy now carry data-bs-target, so alert links to #vcs open the version control tab.

Fix #8494

Add three GitHub version control parameters: a pull request assignee,
assigning the GitHub account linked to the user who started the push,
and comma-separated labels. Weblate adds the configured values that are
missing whenever it creates or updates its pull request.

The acting user is only assigned to new pull requests, so pushes to an
open pull request do not pile up assignees. GitHub silently ignores
users without repository access, which is expected for translators, so
only a configured assignee being ignored is reported. Failures raise a
PullRequestUpdateFailure alert instead of failing the push, because the
pull request already exists at that point.

The settings tab links rendered by crispy now carry data-bs-target, so
alert links to #vcs open the version control tab.

Fix WeblateOrg#8494
@amCap1712
amCap1712 requested a review from nijel as a code owner October 26, 2026 12:00

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 1 issue across 1 rule.

Reviewed by AccessLint, which checks every pull request for accessibility issues.

@@ -0,0 +1,5 @@
{% comment %}Based on crispy original, adds data-bs-target to open tabs from the URL.{% endcomment %}
<li class="nav-item"><a class="nav-link{% if 'active' in link.css_class %} active{% endif %}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

<li> elements must be contained in a <ul>, <ol>, or <menu>.

Details

List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.

@nijel

nijel commented Oct 26, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T18:03:07.656128Z
We couldn’t complete this review. Comment @codex review to try again.
6c51e9a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nijel

nijel commented Oct 26, 2026

Copy link
Copy Markdown
Member

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nijel nijel added this to the 2026.11 milestone Oct 26, 2026
Comment thread weblate/vcs/git.py Outdated
providers = GITHUB_SOCIAL_PROVIDERS
elif (
urlparse(
getattr(settings, "SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL", "")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of the GitHub Enterprise backends has a differently named setting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

Comment thread weblate/vcs/git.py Outdated
missing = [
assignee
for assignee in assignees
if assignee not in assigned and assignee != acting_user

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if silently ignoring acting user assignment here is a good approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

@nijel nijel self-assigned this Oct 26, 2026
@nijel
nijel merged commit 2077ac5 into WeblateOrg:main Oct 28, 2026
34 of 35 checks passed
@nijel

nijel commented Oct 28, 2026

Copy link
Copy Markdown
Member

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable pull/merge requests

2 participants