Page MenuHomePhabricator

Translation update failure
Closed, ResolvedPublic

Description

Today's translation updates could not be pushed to the app. Have you changed branch protection recently?

The command "cd 'wikipedia-android'; git add .; if ! git diff --cached --quiet; then git commit -m 'Localisation updates from https://translatewiki.net.'; git rebase 'origin/master' && git push --force origin  
 HEAD:'twn'; fi" failed.                                                                                                                                                                                          
                                                                                                                                                                                                                  
Exit Code: 1(General error)                                                                                                                                                                                       
                                                                                                                                                                                                                  
Working directory: /scratch/nike                                                                                                                                                                                  
                                                                                                                                                                                                                  
Output:                                                                                                                                                                                                           
================                                                                                                                                                                                                  
[master 289d7c3a5] Localisation updates from https://translatewiki.net.                                                                                                                                           
 73 files changed, 231 insertions(+), 23 deletions(-)                                                                                                                                                             
Current branch master is up to date.                                                                                                                                                                              
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  
Error Output:                                                                                                                                                                                                     
================                                                                                                                                                                                                  
remote: error: GH006: Protected branch update failed for refs/heads/twn.                                                                                                                                          
remote: error: Cannot force-push to this protected branch                                                                                                                                                         
To github.com:wikimedia/apps-android-wikipedia.git                                                                                                                                                                
 ! [remote rejected]     HEAD -> twn (protected branch hook declined)                                                                                                                                             
error: failed to push some refs to 'git@github.com:wikimedia/apps-android-wikipedia.git'

Event Timeline

@Nikerabbit I don't recall changing any branch rules recently, but I do see that the twn branch doesn't have "Allow force pushes" enabled. I've enabled it now; can you try again?

Nikerabbit claimed this task.

Works:

cd 'wikipedia-android'; git add .; if ! git diff --cached --quiet; then git commit -m 'Localisation updates from https://translatewiki.net.'; git rebase 'origin/master' && git push --force origin HEAD:'twn'; fi
[master c0cce2c25] Localisation updates from https://translatewiki.net.
 73 files changed, 231 insertions(+), 23 deletions(-)
Current branch master is up to date.

wikipedia-android: Opened a new pull request.

Is there a possibility that the push restrictions get reset if the branch is deleted and then recreated?

Is there a possibility that the push restrictions get reset if the branch is deleted and then recreated?

Hmm I'm not sure about that. AFAIK the protection rules exist independently of branches, i.e. it's a regex that will match 0 or more branches, if they exist.