Support controlling the submit type for changes from Prolog
Similarly like the "submit_rule" there is now a "submit_type" predicate which returns the allowed submit type for a change. When the submit_type predicate is not provided in the rules.pl then the project default submit type is used for all changes for that project. Filtering the results of the submit_type is also supported in the same way like filtering the results of the submit_rule. Using a submit_type_filter predicate one can enforce a particular submit type from a parent project. For example, a release engineer may want to enforce the FAST_FORWARD_ONLY submit type for all changes pushed to stable release branches while, at the same time, use the project wide default submit type for changes pushed to the development branch. Change-Id: Iec08f412723856b40324a6e0ec00ac523be9a3b6 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
This commit is contained in:
		
				
					committed by
					
						
						Gerrit Code Review
					
				
			
			
				
	
			
			
			
						parent
						
							162c801f4b
						
					
				
				
					commit
					680a5f80d9
				
			@@ -42,6 +42,7 @@ public class ChangeDetail {
 | 
			
		||||
  protected List<ApprovalDetail> approvals;
 | 
			
		||||
  protected List<SubmitRecord> submitRecords;
 | 
			
		||||
  protected Project.SubmitType submitType;
 | 
			
		||||
  protected SubmitTypeRecord submitTypeRecord;
 | 
			
		||||
  protected boolean canSubmit;
 | 
			
		||||
  protected List<ChangeMessage> messages;
 | 
			
		||||
  protected PatchSet.Id currentPatchSetId;
 | 
			
		||||
@@ -189,12 +190,12 @@ public class ChangeDetail {
 | 
			
		||||
    return submitRecords;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public void setSubmitType(Project.SubmitType submitType) {
 | 
			
		||||
    this.submitType = submitType;
 | 
			
		||||
  public void setSubmitTypeRecord(SubmitTypeRecord submitTypeRecord) {
 | 
			
		||||
    this.submitTypeRecord = submitTypeRecord;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public Project.SubmitType getSubmitType() {
 | 
			
		||||
    return submitType;
 | 
			
		||||
  public SubmitTypeRecord getSubmitTypeRecord() {
 | 
			
		||||
    return submitTypeRecord;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public boolean isCurrentPatchSet(final PatchSetDetail detail) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user