Giter VIP home page Giter VIP logo

Comments (3)

i386x avatar i386x commented on June 27, 2024 1

Bash probably transforms escaped \n to real \n when payload string was passed to submit_pr. That's why I don't like strings in Bash. We need to setup unit tests and CI for it with curl, git, and hub mocked.

from auto-maintenance.

richm avatar richm commented on June 27, 2024

Hmm - seems that JSON does not like the newline characters in the body of the PR message:

{"title":"Synchronize files from linux-system-roles/template",
"base":"master",
"head":"lsr-template-sync",
"body":"This PR propagates files from [linux-system-roles/template](https://gith
ub.com/linux-system-roles/template) which should be in sync across [linux-system
-roles](https://github.com/linux-system-roles) repos. In case of changing affect
ed files via pushing to this PR, please do not forget also to push the changes t
o [linux-system-roles/template](https://github.com/linux-system-roles/template) 
repo.

Revision: [`448ff39c16f171b7f09ff5a21e62340add304d55`](https://github.com/linux-
system-roles/template/tree/448ff39c16f171b7f09ff5a21e62340add304d55)

CC: @i386x, @pcahyna, @richm"}

feed this to jq:

parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 8, column 29

remove the newlines from the "body" field:

{"title":"Synchronize files from linux-system-roles/template",
"base":"master",
"head":"lsr-template-sync",
"body":"This PR propagates files from [linux-system-roles/template](https://gith
ub.com/linux-system-roles/template) which should be in sync across [linux-system
-roles](https://github.com/linux-system-roles) repos. In case of changing affect
ed files via pushing to this PR, please do not forget also to push the changes t
o [linux-system-roles/template](https://github.com/linux-system-roles/template) 
repo. Revision: [`448ff39c16f171b7f09ff5a21e62340add304d55`](https://github.com/
linux-system-roles/template/tree/448ff39c16f171b7f09ff5a21e62340add304d55) CC: @
i386x, @pcahyna, @richm"}

feed this to jq

{
  "title": "Synchronize files from linux-system-roles/template",
  "base": "master",
  "head": "lsr-template-sync",
  "body": "This PR propagates files from [linux-system-roles/template](https://github.com/linux-system-roles/template) which should be in sync across [linux-system-roles](https://github.com/linux-system-roles) repos. In case of changing affected files via pushing to this PR, please do not forget also to push the changes to [linux-system-roles/template](https://github.com/linux-system-roles/template) repo. Revision: [`448ff39c16f171b7f09ff5a21e62340add304d55`](https://github.com/linux-system-roles/template/tree/448ff39c16f171b7f09ff5a21e62340add304d55) CC: @i386x, @pcahyna, @richm"
}

I probably broke this when I added support for hub to the sync script. That is, I probably broke the newline escaping.

from auto-maintenance.

richm avatar richm commented on June 27, 2024

obsolete since we use tox-lsr now

from auto-maintenance.

Related Issues (15)

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.