Documentation
¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause
Authors: Alexander Jung <alex@nderjung.net>
Copyright (c) 2020, Alexander Jung. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-3-Clause
Authors: Alexander Jung <alex@nderjung.net>
Copyright (c) 2020, Alexander Jung. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-3-Clause
Authors: Alexander Jung <alex@nderjung.net>
Copyright (c) 2020, Alexander Jung. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-3-Clause
Authors: Alexander Jung <alex@nderjung.net>
Copyright (c) 2020, Alexander Jung. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CheckCmd = &cobra.Command{ Use: "check", Short: "Run the check step", Run: doCheckCmd, DisableFlagsInUseLine: true, }
CheckCmd ...
var InCmd = &cobra.Command{ Use: "in [OPTIONS] PATH", Short: "Run the input parsing step", Run: doInCmd, Args: cobra.ExactArgs(1), DisableFlagsInUseLine: true, }
InCmd
var OutCmd = &cobra.Command{ Use: "out [OPTIONS] PATH", Short: "Run the output processing step", Run: doOutCmd, Args: cobra.ExactArgs(1), DisableFlagsInUseLine: true, }
OutCmd
Functions ¶
This section is empty.
Types ¶
type CheckRequest ¶
CheckRequest from the check stdin.
type CheckResponse ¶
type CheckResponse []Version
CheckResponse represents the structure Concourse expects on stdout
func Check ¶
func Check(req CheckRequest) (*CheckResponse, error)
type InMetadata ¶
type InMetadata struct {
PRID int `json:"pr_id"`
PRHeadRef string `json:"pr_head_ref"`
PRHeadSHA string `json:"pr_head_sha"`
PRBaseRef string `json:"pr_base_ref"`
PRBaseSHA string `json:"pr_base_sha"`
CommentID int64 `json:"comment_id"`
Body string `json:"body"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
AuthorAssociation string `json:"author_association"`
HTMLURL string `json:"html_url"`
UserLogin string `json:"user_login"`
UserID int64 `json:"user_id"`
UserAvatarURL string `json:"user_avatar_url"`
UserHTMLURL string `json:"user_html_url"`
}
type InParams ¶
type InParams struct {
CommentFile string `json:"comment_file"`
SourcePath string `json:"source_path"`
GitDepth int `json:"git_depth"`
Submodules bool `json:"submodules"`
SkipDownload bool `json:"skip_download"`
FetchTags bool `json:"fetch_tags"`
IntegrationTool string `json:"integration_tool"`
}
InParams are the parameters for configuring the input
type InRequest ¶
type InRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
Params InParams `json:"params"`
}
InRequest from the check stdin.
type InResponse ¶
InResponse represents the structure Concourse expects on stdout
type Metadata ¶
type Metadata []*MetadataField
Metadata contains the serialized interface
type MetadataField ¶
Metadata has a key name and value
type OutParams ¶
type OutParams struct {
Path string `json:"path"`
State string `json:"state"`
Comment string `json:"comment"`
CommentFile string `json:"comment_file"`
Labels []string `json:"labels"`
AddLabels []string `json:"add_labels"`
RemoveLabels []string `json:"remove_labels"`
DeleteLastComment bool `json:"delete_last_comment"`
}
type OutRequest ¶
OutRequest from the check stdin.
type OutResponse ¶
OutResponse represents the structure Concourse expects on stdout
func Out ¶
func Out(inputDir string, req OutRequest) (*OutResponse, error)
type Source ¶
type Source struct {
// Meta
SkipSSLVerification bool `json:"skip_ssl"`
GithubEndpoint string `json:"github_endpoint"`
// The repository to interface with
Repository string `json:"repository"`
DisableGitLfs bool `json:"disable_git_lfs"`
// Access methods
AccessToken string `json:"access_token"`
Username string `json:"username"`
Password string `json:"password"`
// Selection criteria
OnlyMergeable bool `json:"only_mergeable"`
States []string `json:"states"`
Labels []string `json:"labels"`
Comments []string `json:"comments"`
CommenterAssociation []string `json:"commenter_association"`
MapCommentMeta bool `json:"map_comment_meta"`
ReviewStates []string `json:"review_states"`
When string `json:"when"` // all, latest, first
IgnoreStates []string `json:"ignore_states"`
IgnoreLabels []string `json:"ignore_labels"`
IgnoreComments []string `json:"ignore_comments"`
IgnoreDrafts bool `json:"ignore_drafts"`
}
Source parameters provided by the resource.