Giter Club home page Giter Club logo

Comments (2)

dosubot avatar dosubot commented on July 4, 2024 3

Hey @thiDucTran! I'm here to help you with any questions or issues you have. Let's work together to solve the problem.

Yes, it is expected behavior for the pipeline_id, repo_url, and commit_sha parameters in the webhook plugin for deployments to allow <no value> or null.

  • The pipeline_id field is marked as required and cannot be null or empty.
  • The repo_url and commit_sha fields are not marked as required, but at least one of them must be provided.

Here is the relevant code snippet:

if request.DeploymentCommits == nil {
    if request.CommitSha == "" || request.RepoUrl == "" {
        return errors.Convert(fmt.Errorf("commit_sha or repo_url is required"))
    }
    // create a deployment_commit record
    deploymentCommit := &devops.CicdDeploymentCommit{
        DomainEntity: domainlayer.DomainEntity{
            Id: GenerateDeploymentCommitId(connection.ID, request.PipelineId, request.RepoUrl, request.CommitSha),
        },
        // other fields...
    }
    // other logic...
}

This ensures that while pipeline_id is mandatory, repo_url and commit_sha can be null or empty, but at least one of them must be provided [1].

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from incubator-devlake.

thiDucTran avatar thiDucTran commented on July 4, 2024

nevermind..seems that it is inserting the literal value <no value> into the DB I am dynamically grabbing these values via annotations ...and not doing it correctly..but instead of passing "" or null ..it is passing in the literal value <no value>

from incubator-devlake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.