By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Allow updating repo URL

roundabout,
created on Tuesday, 11 June 2024, 18:19:54 (1718129994), received on Wednesday, 31 July 2024, 06:54:49 (1722408889)
Author identity: vlad <vlad.muntoiu@gmail.com>

38d5f510aeb5e4f631f483d7afe2e5ed2628c84b

app.py

@@ -1608,6 +1608,7 @@ def repository_settings_post(username, repository):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                repo.visibility = flask.request.form.get("visibility", type=int)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                repo.info = flask.request.form.get("description")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                repo.default_branch = flask.request.form.get("default_branch")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            repo.url = flask.request.form.get("url")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                # Update site settings
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                had_site = repo.has_site
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

templates/repository/repo-settings.html

@@ -31,6 +31,10 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                            {% trans %}Description{% endtrans %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                            <textarea id="description" name="description" rows="4">{% if repo_data.info %}{{ repo_data.info }}{% endif %}</textarea>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                        </label>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    <label for="url">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        {% trans %}Homepage{% endtrans %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        <input id="url" name="url" type="url" value="{% if repo_data.url %}{{ repo_data.url }}{% endif %}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    </label>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                        <label for="default-branch">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                            {% trans %}Default branch{% endtrans %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                            <select id="default-branch" name="default_branch">