* disable pegomock --use-experimental-model-gen, cause random fail by segv
* make regen-mocks
* fix mock code which uses non experimental pegomock codes
* Moved CommandContext and CommandResult to models (#193)
* Moved CommandContext and CommandResult to models
* move from models to command
rename CommandContext -> Context
rename CommandResult -> Result
* moved command related helpers into command package
* move ProjectCommandContext and ProjectResult to command/project package
* move project command context and project result
* revert unrelated code
* move tests
* fix left over
* fix linting
* fix tests
* remove unused import
* fix project context dependencies
* fix depenedecies
* fix typo
* add .devcontainer to .gitignore
* allow AzureDevOps host to be specified in the user_config
* fix spacing issues
* gofmt
* fixes to cmd and update to approach
* add specific self host fixtures
* add specific self host parser tests
* update code to azure self hosted devops
* go fmt
Co-authored-by: atlantisbot <lkysow+atlantis@gmail.com>
* Adding policy_check support into yaml config
* Added policy check model and runtime structs
* Adding BuildPolicyCheckCommand to ProjectCommandBuilder
* Return incorrectly deleted code
* Remove BuildAutoPolicyPlanCommand from ProjectCommandBuilder
* Split runAutoCommand into two functions
runAutoPlanCommand - does what originally RunAutoplancommand was doing
except now it returns CommandResult and []models.ProjectCommandContext
runAutoPolicyCheckCommand - accepts CommandContext, CommandResult, and
[]models.ProjectCommandContext as arguments and runs PolicyCheckStep runner
* Refactor RunCommentCommand
* Remove BuildPolicyCheckCommand and rename StepCmdExec back to TerraformExec
* Add policy step runner logic and conftest interfaces.
* Add show step runner to policy check stage.
* Adding models.PolicyCheckCommand to buildCtx
This also means buildPlanAllCommands call buildCtx twice once with
models.PlanCommand and once with models.PolicyCheckCommand
* Adding new project_command_builder that supports policy_check
* Refactoring PolicyCheck specific logic into a PolicyCheckProjectCommandBuilder
* Moving events.CommandContext to models.CommandContext this will allow me
to remove buildCtx method and move ProjectCommandContext creation into
models package
* Policy Owners might be different types, for that reason we are
refactoring Owners into its own struct with specific keys defining
different owner types
Co-authored-by: Nish Krishnan <nishk@lyft.com>
Co-authored-by: Nish Krishnan <nishkrishnan@users.noreply.github.com>
If plan is run manually in a draft PR, the PR may hold locks. If
the draft PR is then closed, without first marking it Ready For
Review, the locks are left in place. To resolve this, we can
process closing draft PRs in the same way as non-draft PRs.
- Re-write tests for azuredevops_client
- CircleCI checks should pass
- NewAzureDevopsClient() now takes a hostname like NewGithubClient()
- Docs include comment about default merge strategy requirements
- Add blackfriday for markdown-to-html comment translation
Azure Devops doesn't support markdown in work item comments
- Restore NewRepo() to original form - removing project parameter
- Add models.SplitAzureDevopsRepoFullName() to handle project name
All Azure Devops URIs need owner, project, and repo. This function
allows us to avoid adding project to NewRepo()
- Update calls to azuredevops.NewClient() to match library requirements
- Add context to azuredevops client to match library requirements
- Basic working CreateComment() and MergePull() support (not widely
tested)
- Add bluemonday to strip HTML tags from comments
- Rename all WorkItemEvent refs to WorkItemCommentedEvent
- Rename pullEvent to event to match types
- Minor comment clean-ups
- Support multiple pull request links in a work item
- Add missing headRepo set to AzureDevops event parser
- Strip 'refs/heads' from branch values sent to models.PullRequest
- Fix calls to NewClient() to use org, not username
- Add notes about use of /'s in repo FullName
- Force use of 'dev.azure.com' for VCSHost.Hostname value
- NewAzureDevopsClient(): Rename 'account' to 'username' to match docs
- NewAzureDevopsClient(): Rename unused 'hostname' to 'org'