Bitbucket Cloud changed their APIs to deprecate the username fields.
This broke how we were checking for approvals. Rather than propagate the
UUID field through the PullRequest model, I use the pull request API
response directly while checking approvers.
To be clear, Atlantis was compatible with 0.12 before this commit, but
this change makes 0.12 the default version *if* users haven't set the
--default-tf-version flag.
- 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)
Since we're including the command output inside the error, we don't need
to also return the output. This was resulting in the error output being
printed twice.
If there was an error during cloning, we would sometimes print the clone
credentials to the pull request and in the Atlantis logs. This change
ensures we print the redacted clone url.
We also change the redacted clone url to contain "username:<redacted>"
so that if users see the redacted url in logs, they'll know we were
using a credentialed form and so if they try to replicate with curl
they'll know to substitute the correct credentials.
- 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'
cmd/server.go:
- Add default empty strings for Azure Devops webhook basic user/pass
server/user_config.go:
- Rename AzureDevopsBasicUser to AzureDevopsWebhookBasicUser to signify
difference from the API call credentials
server/server.go:
- fix azuredevopsClient var
- add Azure Devops to []supportedVCSHosts
- add AzureDevopsRequestValidator for basic auth webhook support
server/azuredevops_request_validator*.go:
- add charset utf-8 to support content-types for webhooks
- start adding validator tests
server/events_controller.go*:
- change azuredevops webhook header to Request-Id
- move Validate() and Basic Auth webhook support to go-azuredevops
- add pull and comment event functions
When using --checkout-strategy merge, we were performing the merge
without the --no-ff flag. This meant that if the branch could be merged
via a fast-forward merge (without a merge commit), then later when we
ran git rev-parse HEAD^2 to determine if the repo was at the right
commit, it would fail.
Now we merge with --no-ff which ensures the commit tree will always look
the same and git rev-parse HEAD^2 will always succeed.
Previously, if you were using project names and you had two projects
with the same directory and workspace but different workflows, running
"atlantis apply" would fail. This was because we weren't figuring out
what the project name was for each pending plan.
This change fixes this by extracting the project name from the planfile.
We also handle /'s in the project name by substituting them with '::'.
This allows us to convert them back to /'s when we're figuring out the
project names from the filenames. It's safe to do this because : isn't
an allowed character for project names.
We also remove a final substitution of invalid filename characters
because we rely on the validation of the project names instead which
happens when validating the atlantis.yaml file.