Page MenuHomePhabricator

Wikidata Mismatch Finder: Change target branch and commit directly
Closed, ResolvedPublic1 Estimated Story Points

Description

In T332695 we made a request to open translatewiki.net PRs against our main branch. However, we had change in our branching model for the Mismatch Finder project and so now we do not release directly from our default branch development.

Therefore, we would like to ask that translatewiki would make direct commits to our development branch, which will be released periodically to the life site (but won't require direct code review anymore).

Event Timeline

Change 961384 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] WikidataMismatchFinder: Use development branch

https://gerrit.wikimedia.org/r/961384

abi_ set the point value for this task to 1.
abi_ triaged this task as Medium priority.Sep 27 2023, 1:35 PM

Change 961384 merged by jenkins-bot:

[translatewiki@master] WikidataMismatchFinder: Use development branch

https://gerrit.wikimedia.org/r/961384

@ItamarWMDE Getting the following error when pushing translations:

  The command "cd 'wikidata-mismatch-finder'; git add .; if ! git diff --cach  
  ed --quiet; then git commit -m 'Localisation updates from https://translate  
  wiki.net.'; git rebase 'origin/development' && git push origin 'development  
  '; fi" failed.                                                               
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory: /scratch/exports                                          
                                                                               
  Output:                                                                      
  ================                                                             
  [development e440b6e] Localisation updates from https://translatewiki.net.   
   1 file changed, 36 insertions(+)                                            
   create mode 100644 public/i18n/ce.json                                      
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  Rebasing (1/1)↵
↵
Successfully rebased and updated refs/heads/development.  
  remote: error: GH006: Protected branch update failed for refs/heads/develop  
  ment.                                                                        
  remote: error: Changes must be made through a pull request. 5 of 5 required  
   status checks are expected. You're not authorized to push to this branch.   
  Visit https://docs.github.com/articles/about-protected-branches/ for more i  
  nformation.                                                                  
  To github.com:wmde/wikidata-mismatch-finder.git                              
   ! [remote rejected] development -> development (protected branch hook decl  
  ined)                                                                        
  error: failed to push some refs to 'github.com:wmde/wikidata-mismatch-finde  
  r.git'

I think it might make sense to create a PR instead of pushing directly to that branch.

@abi_, Apologies, translatewiki was not in the list of allowed contributors, but I now added it. Can you please try again?

Change 963194 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] WikidataMismatchFinder: Create PR when exporting translation

https://gerrit.wikimedia.org/r/963194

Change 963194 merged by jenkins-bot:

[translatewiki@master] WikidataMismatchFinder: Create PR when exporting translation

https://gerrit.wikimedia.org/r/963194

@abi_, Apologies, translatewiki was not in the list of allowed contributors, but I now added it. Can you please try again?

Still having the same issue:

The command "cd 'wikidata-mismatch-finder'; git add .; if ! git diff --cached --quiet; then git commit -m 'Localisation updates from https://translatewiki.net.'; git rebase 'origin/development' && git push origin 'development'; fi" failed.  
                                                                                                                                                                                                                                                 
Exit Code: 1(General error)                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                 
Working directory: /scratch/exports                                                                                                                                                                                                              
                                                                                                                                                                                                                                                 
Output:                                                                                                                                                                                                                                          
================                                                                                                                                                                                                                                 
[development 0f742c0] Localisation updates from https://translatewiki.net.                                                                                                                                                                       
 1 file changed, 36 insertions(+)                                                                                                                                                                                                                
 create mode 100644 public/i18n/ce.json                                                                                                                                                                                                          
Current branch development is up to date.                                                                                                                                                                                                        
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                 
Error Output:                                                                                                                                                                                                                                    
================                                                                                                                                                                                                                                 
remote: error: GH006: Protected branch update failed for refs/heads/development.                                                                                                                                                                 
remote: error: Changes must be made through a pull request. 5 of 5 required status checks are expected.                                                                                                                                          
To github.com:wmde/wikidata-mismatch-finder.git                                                                                                                                                                                                  
 ! [remote rejected] development -> development (protected branch hook declined)                                                                                                                                                                 
error: failed to push some refs to 'github.com:wmde/wikidata-mismatch-finder.git'

We've been having issues with protected branches: https://phabricator.wikimedia.org/T235103

I tried by creating a PR, and that worked: https://github.com/wmde/wikidata-mismatch-finder/pull/699

If you would like to keep protected branches, then we can continue to create the PR to the development branch.

Alright, thank you. We do need to ensure branch protections, so if that is the case, we will continue with PRs.

Thanks, marking this as done for now.