• frank, tethys, christmas

      Requirements

      • Write natively to any branch of a Git repository hosted on Github
      • Write to any branch of a Git repository
      • Must maintain compatibility with Jenkins 2.7.1 and above

      Desired user experience

          [JENKINS-42080] API to write a single file to the repository

          Jesse Glick added a comment -

          Jesse Glick said there is beginnings of this in the scm-api

          No, there has never been any proposed API to write files. Sounds like a battle which should not be picked—just provide a downloadable file and ask people to commit it when ready.

          Jesse Glick added a comment - Jesse Glick said there is beginnings of this in the scm-api No, there has never been any proposed API to write files. Sounds like a battle which should not be picked—just provide a downloadable file and ask people to commit it when ready.

          Patrick Wolf added a comment -

          This was cloned from JENKINS-39703 jglick and the comment is from you referring to the Read API. I split this off to track the write API separately.

          Patrick Wolf added a comment - This was cloned from JENKINS-39703 jglick and the comment is from you referring to the Read API. I split this off to track the write API separately.

          Jesse Glick added a comment -

          As noted in JENKINS-39703, SCMFile may need to add some methods to define some new abstract type SCMFileContent which has contentAsBytes etc. but also a replace method—since GitHub does not let you overwrite a file without specifying what you are overwriting (presumably to avoid data loss with non-fast-forward merges).

          Jesse Glick added a comment - As noted in JENKINS-39703 , SCMFile may need to add some methods to define some new abstract type SCMFileContent which has contentAsBytes etc. but also a replace method—since GitHub does not let you overwrite a file without specifying what you are overwriting (presumably to avoid data loss with non-fast-forward merges).

          James Dumay added a comment -

          We've a method around this now.

          James Dumay added a comment - We've a method around this now.

            Unassigned Unassigned
            hrmpw Patrick Wolf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: