Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47310

Editing github pipeline with no push access to repo results in blank editor page

    XMLWordPrintable

    Details

    • Sprint:
      Blue Ocean 1.4 - beta 1, Blue Ocean 1.4 - beta 2
    • Similar Issues:

      Description

      Note: 

      This needs to be ported to release/1.3

       

      Steps to reproduce

      • Create pipeline for repo where you have no push access
      • After pipeline is build, click on Edit pipeline, it renders an empty editor page, see attachment.

      What should happen is a warning that push access will be required to edit it. 

      In the background editor calls API to fetch Jenkinsfile but API responds with 428 as provided access token or the user doesn't have push access.

      Unable to find source-code formatter for language: json. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml428 (Precondition Required)
      
      {
        "message" : "You do not have permission to push changes to cloudbees/test-mvn-app",
        "code" : 428,
        "errors" : [ ]
      }
      

        Attachments

        1. push-error.har
          37 kB
        2. push-error.png
          push-error.png
          131 kB
        3. screenshot-1.png
          screenshot-1.png
          46 kB

          Issue Links

            Activity

            Hide
            michaelneale Michael Neale added a comment -

            Keith Zantow Cliff Meyers I expect that with github, we can't even open the Jenkinsfile without push access (but if we can, probably need a better error, well in any case need to) 

            I could imagine you open it in read only - and "save" could warn, and then give you a chance to copy/pasta it (certainly shouldn't lose any edits).

            Show
            michaelneale Michael Neale added a comment - Keith Zantow Cliff Meyers I expect that with github, we can't even open the Jenkinsfile without push access (but if we can, probably need a better error, well in any case need to)  I could imagine you open it in read only - and "save" could warn, and then give you a chance to copy/pasta it (certainly shouldn't lose any edits).
            Hide
            kzantow Keith Zantow added a comment -

            The user is supposed to get the credential dialog to try to set up some credentials that do have push access.

            Show
            kzantow Keith Zantow added a comment - The user is supposed to get the credential dialog to try to set up some credentials that do have push access.
            Hide
            michaelneale Michael Neale added a comment -

            Keith Zantow right - so its as if they didn't have any credentials at all and want to open it for the "first time" for that user... 

            Show
            michaelneale Michael Neale added a comment - Keith Zantow right - so its as if they didn't have any credentials at all and want to open it for the "first time" for that user... 

              People

              • Assignee:
                kzantow Keith Zantow
                Reporter:
                vivek Vivek Pandey
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: