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

Avoid to trigger/webhook Gitea PRs which have changes conflicting with the target branch

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • gitea-plugin
    • None
    • Gitea Plugin 1.2.1
      Jenkins ver. 2.249.1
      Gitea 1.13.0

      There are PRs which state in Gitea: "This pull request has changes conflicting with the target branch."

      As for all PRs also for these PRs the Gitea webhooks Jenkins and the build fails as expected. See attached log for the thrown exception.

      Additionally there is no possibility to catch the exception, since it is thrown within the default checkout stage and so there is no possibility to handle it better, e.g. by means of  build failure analyzer or a meaningful notification.

       

      Expected Results: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. Or the Jenkins Gitea Plugin do recognize such webhooks and does not start a build. Both alternatives could be configurable.

       

      Maybe the API flag "mergeable" should be considered?

          [JENKINS-64351] Avoid to trigger/webhook Gitea PRs which have changes conflicting with the target branch

          m l created issue -
          m l made changes -
          Environment Original: Gitea Plugin 1.2.1
          Jenkins ver. 2.249.1
          Gitea 1.12.5
          New: Gitea Plugin 1.2.1
          Jenkins ver. 2.249.1
          Gitea 1.13.0
          m l made changes -
          Description Original: Our Gitea organization has over 500 repositories. In the scan log, I only see the first 30 repositories being evaluated resulting in jobs not being created for repos that come after the first 30.
          {noformat}
          30 repositories were processed
          [Wed Oct 28 10:36:38 CET 2020] Finished organization scan. Scan took 1 min 15 sec
          Finished: SUCCESS{noformat}
           

          *Expected Results*: Repositories beyond the first 30 should be evaluated and jobs should be created for them if they match the Repo/Branch/Jenkinsfile criteria

          *Solution Proposal:* Extend the scan limit to 1000 or make it configurable.
          New: Our Gitea organization has over 500 repositories. In the scan log, I only see the first 30 repositories being evaluated resulting in jobs not being created for repos that come after the first 30.
          {noformat}
          30 repositories were processed
          [Wed Oct 28 10:36:38 CET 2020] Finished organization scan. Scan took 1 min 15 sec
          Finished: SUCCESS{noformat}
           

          *Expected Results*: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. 

          *Solution Proposal:* Extend the scan limit to 1000 or make it configurable.
          m l made changes -
          Summary Original: Avoid to trigger Gitea PRs which cannot be automatically merged New: Avoid to trigger Gitea PRs which have changes conflicting with the target branch
          m l made changes -
          Description Original: Our Gitea organization has over 500 repositories. In the scan log, I only see the first 30 repositories being evaluated resulting in jobs not being created for repos that come after the first 30.
          {noformat}
          30 repositories were processed
          [Wed Oct 28 10:36:38 CET 2020] Finished organization scan. Scan took 1 min 15 sec
          Finished: SUCCESS{noformat}
           

          *Expected Results*: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. 

          *Solution Proposal:* Extend the scan limit to 1000 or make it configurable.
          New: There are PRs which state in Gitea: "This pull request has changes conflicting with the target branch."

          As for all PRs also for these PRs the Gitea webhooks Jenkins and the build fails as expected. See attached log for the thrown exception.

          Additionally there is no possibility to catch the exception, since it is thrown within the default checkout stage and so there is no possibility to handle it better, e.g. by means of  build failure analyzer or a meaningful notification.

           

          *Expected Results*: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. Or the Jenkins Gitea Plugin do recognize such webhooks and does not start a build. Both alternatives could be configurable.
          m l made changes -
          Summary Original: Avoid to trigger Gitea PRs which have changes conflicting with the target branch New: Avoid to trigger/webhook Gitea PRs which have changes conflicting with the target branch
          m l made changes -
          Attachment New: Log_ConflictingPR_Build.txt [ 53494 ]
          m l made changes -
          Attachment Original: Log_ConflictingPR_Build.txt [ 53494 ]
          m l made changes -
          Attachment New: Log_ConflictingPR_Build.txt [ 53495 ]
          m l made changes -
          Description Original: There are PRs which state in Gitea: "This pull request has changes conflicting with the target branch."

          As for all PRs also for these PRs the Gitea webhooks Jenkins and the build fails as expected. See attached log for the thrown exception.

          Additionally there is no possibility to catch the exception, since it is thrown within the default checkout stage and so there is no possibility to handle it better, e.g. by means of  build failure analyzer or a meaningful notification.

           

          *Expected Results*: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. Or the Jenkins Gitea Plugin do recognize such webhooks and does not start a build. Both alternatives could be configurable.
          New: There are PRs which state in Gitea: "This pull request has changes conflicting with the target branch."

          As for all PRs also for these PRs the Gitea webhooks Jenkins and the build fails as expected. See attached log for the thrown exception.

          Additionally there is no possibility to catch the exception, since it is thrown within the default checkout stage and so there is no possibility to handle it better, e.g. by means of  build failure analyzer or a meaningful notification.

           

          *Expected Results*: Gitea does not trigger/webhook pull requests which have changes conflicting with the target branch. Or the Jenkins Gitea Plugin do recognize such webhooks and does not start a build. Both alternatives could be configurable.

           

          Maybe the API flag "mergeable" should be considered?
          Steven made changes -
          Attachment New: image-2021-11-06-20-15-59-454.png [ 56713 ]

            Unassigned Unassigned
            mrlov m l
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: