mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-06 16:38:46 +00:00
- 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)
47 lines
2.1 KiB
Go
47 lines
2.1 KiB
Go
// Copyright 2017 HootSuite Media Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the License);
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an AS IS BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
// Modified hereafter by contributors to runatlantis/atlantis.
|
|
|
|
package events
|
|
|
|
import (
|
|
"github.com/runatlantis/atlantis/server/events/models"
|
|
"github.com/runatlantis/atlantis/server/logging"
|
|
)
|
|
|
|
// CommandContext represents the context of a command that should be executed
|
|
// for a pull request.
|
|
type CommandContext struct {
|
|
// BaseRepo is the repository that the pull request will be merged into.
|
|
BaseRepo models.Repo
|
|
// HeadRepo is the repository that is getting merged into the BaseRepo.
|
|
// If the pull request branch is from the same repository then HeadRepo will
|
|
// be the same as BaseRepo.
|
|
// See https://help.github.com/articles/about-pull-request-merges/.
|
|
HeadRepo models.Repo
|
|
Pull models.PullRequest
|
|
// User is the user that triggered this command.
|
|
User models.User
|
|
Log *logging.SimpleLogger
|
|
// PullMergeable is true if Pull is able to be merged. This is available in
|
|
// the CommandContext because we want to collect this information before we
|
|
// set our own build statuses which can affect mergeability if users have
|
|
// required the Atlantis status to be successful prior to merging.
|
|
PullMergeable bool
|
|
// AzureDevopsWorkItemID Azure Devops Atlantis commands come from a work item
|
|
// comment with a link to one or more pull requests. Pull requests may
|
|
// also be linked to more than one work item, so we need to know which work item
|
|
// triggered this pull request command.
|
|
// https://docs.microsoft.com/en-us/azure/devops/boards/queries/link-work-items-support-traceability?view=azure-devops&tabs=new-web-form
|
|
AzureDevopsWorkItemID int
|
|
}
|