- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
Implementation of required workflows Actions #32374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9421146    to
    717a95e      
    Compare
  
    717a95e    to
    fc27bcf      
    Compare
  
    | Anyone interested in this? What should I do next to push this forward? | 
fc27bcf    to
    80f51fe      
    Compare
  
    | v, err := actions_service.CreateRequireAction(ctx, orgID, form.RepoName, form.WorkflowName) | ||
| if err != nil { | ||
| log.Error("CreateRequireAction: %v", err) | ||
| ctx.JSONError(ctx.Tr("actions.require_action.creation.failed")) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require_action.creation.failed needs an argument
require_action.creation.failed = Create Global Require Action %s Failed.
|  | ||
| if err := actions_service.DeleteRequireActionByID(ctx, id); err != nil { | ||
| log.Error("Delete RequireAction [%d] failed: %v", id, err) | ||
| ctx.JSONError(ctx.Tr("actions.require_action.deletion.failed")) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot find actions.require_action.deletion.failed in locale_en-US.ini
        
          
                modules/actions/workflows.go
              
                Outdated
          
        
      | return _DetectWorkflows(gitRepo, commit, triggedEvent, payload, detectSchedule, entries) | ||
| } | ||
|  | ||
| func _DetectWorkflows( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use detectWorkflows as the function name
        
          
                modules/actions/workflows.go
              
                Outdated
          
        
      | return _DetectScheduledWorkflows(gitRepo, commit, entries) | ||
| } | ||
|  | ||
| func _DetectScheduledWorkflows(gitRepo *git.Repository, commit *git.Commit, entries git.Entries) ([]*DetectedWorkflow, error) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto. Please use detectScheduledWorkflows
|  | ||
| // Listing all RequireAction | ||
| func RequireAction(ctx *context.Context) { | ||
| ctx.Data["ActionsTitle"] = ctx.Tr("actions.requires") | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what ActionsTitle is used for. Maybe ctx.Data["Title"] = ctx.Tr("actions.require_action") ?
80f51fe    to
    1e6d469      
    Compare
  
    …ove WIP Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
f20eeab    to
    0e1d64c      
    Compare
  
    | Any further progress on this? | 
| Any further progress on this? Pending or? | 
| support organization actions | 
| it's important !!! multiple micro service deploy project | 
| This pull requests still need more work. CI is not PASS, some files conflicted and some reviews haven't been resolved. | 




After some offline discussion, it is agreed that @AvengerMoJo will hand over #31869 to me; and AFAIK on Github such scenario is usually handled by creating a new PR to replace the old one, so I'm doing just that.
TL;DR: This PR is the continuation (#31869, #30067) of attempts of implementing global required workflows Actions, as requested in #26666.