Git Product home page Git Product logo

action-set-json-field's Introduction

Hi there! My name is Jossef Harush Kadouri.

  • Founder of the cybersecurity startups zeronetworks.com and dusti.co
  • I (git) merged my wife's family name with mine, hence "Harush Kadouri"
  • Ranked in the top 1% on Stack Overflow
  • Passionate about hacking stuff, operating systems, and building computers
  • Graphic designer with OCD for pixel-perfect UI
  • Riding motorcycles (Ducati FTW!)
  • Growing hot peppers and organizing events in Israel

Feel free to contact me at [email protected]

action-set-json-field's People

Contributors

jossef avatar kukurijek avatar stefanh-at avatar tritolium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

action-set-json-field's Issues

Update the value of the field inside an array

I have the JSON -

{ "version": "1", "myArr": [ { "id": "1" } ] }

I want to change the value of the id inside the sampleArray. Using the github action, it adds id as a new field in the object instead of editing the existing id.

Is there any solution for this?

Set indent format for updates.

Feature request: Would love to be able to set how many spaces for each indent on updates. Our project has it set to 4, and when we run this it gets updated to 2 which is no biggie but occasionally getting a merge conflict failure just because of tabbing.

Thanks for creating this, its a great utility!

Update to Node.js 16

Hi. When will you be able to update to Node.js 16 as this is currently showing as warning in Github Actions?

cannot set values in arrays

Hello there.

I'm facing troubles updating values in json arrays.

For eg, updating value config.kvms[1].entry[0].secured_data, it will nest secured_data property under config.["kvms[1]"]["entry[0]"] which is not really expected ๐Ÿ˜„

Screenshot 2023-02-03 at 21 53 27

Looks like match regexp is not valid on GitHub (because brackets are escaped, including additional characters ???) but valid running the code on local server...

Cheers ๐Ÿฅ‚

Trouble with arrays of objects.

Given the following json:

{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true,
            "package": "ApexRecipes",
            "versionName": "Spring '21 release",
            "versionNumber": "51.0.0.NEXT"
        }
    ],
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "51.0"
}

When I run this action:

- uses: jossef/action-set-json-field@v1
   with:
     file: sfdx-project.json
     field: packageDirectories[0].versionNumber
     value: ${steps.bumpVersion.output.result}

with the field of packageDirectories[0].versionNumber the following is appended to the file,

"packageDirectories[0]": { "versionNumber": "${steps.bumpVersion.output.result}" }

It would seem the action isn't aware of how to edit a nested property in an array. Am I doing this wrong, or is this a feature request?

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.