diff --git a/TGControlPanel/TestMergeManager.cs b/TGControlPanel/TestMergeManager.cs index 695495cce1..0a621a4b03 100644 --- a/TGControlPanel/TestMergeManager.cs +++ b/TGControlPanel/TestMergeManager.cs @@ -133,6 +133,18 @@ namespace TGControlPanel LoadPullRequests(null); } + /// + /// Calls and shows the user an error prompt if it fails + /// + /// The to call on + async void GenerateChangelog(ITGRepository repo) + { + string error = null; + await WrapServerOp(() => repo.GenerateChangelog(out error)); + if (error != null) + MessageBox.Show(String.Format("Error generating changelog: {0}", error)); + } + /// /// Called when the is clicked. Calls if necessary, merge pull requests, and call . Closes the if appropriate /// @@ -167,12 +179,9 @@ namespace TGControlPanel return; } - await WrapServerOp(() => repo.GenerateChangelog(out error)); - if (error != null) - MessageBox.Show(String.Format("Error generating changelog: {0}", error)); - if (UpdateToRemoteRadioButton.Checked) { + GenerateChangelog(repo); await WrapServerOp(() => error = repo.SynchronizePush()); if (error != null) MessageBox.Show(String.Format("Error sychronizing repo: {0}", error)); @@ -197,6 +206,10 @@ namespace TGControlPanel if (errors.Count != 0) return; + if (pulls.Count > 0) + //regen the changelog + GenerateChangelog(repo); + //Start the compile if (!currentInterface.GetComponent().Compile(pulls.Count == 1)) MessageBox.Show("Could not start compilation!");