Skip to content

Commit 7d83907

Browse files
authored
Merge pull request #358 from jglick/SCM2
Deleting unused `SCM2`
2 parents 54bc43b + 1b5195d commit 7d83907

File tree

5 files changed

+2
-233
lines changed

5 files changed

+2
-233
lines changed

docs/implementation.adoc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,6 @@ Auto-registration of webhooks is performed in different methods depending on the
14661466

14671467
* `SCMNavigator.afterSave(_owner_)`
14681468
* `SCMSource.afterSave()`
1469-
* `SCM2.afterSave(_job_)`
14701469

14711470
In the above methods you need to register the webhook url using your SCM Provider API to which Jenkins will listen for events.
14721471

@@ -1483,17 +1482,6 @@ public String getHookUrl() {
14831482
}
14841483
----
14851484

1486-
[NOTE]
1487-
====
1488-
Existing implementations of the `hudson.scm.SCM` API have traditionally extended `hudson.triggers.Trigger` in order to integrate capture the requirement for setting up a webhook from the `Trigger.start(_job_,_newInstance_)` method.
1489-
1490-
This leads to a proliferation of triggers for multiple source control systems and consequently confuses users and leads to a bad user experience.
1491-
1492-
Switching those implementations to use `SCM2.afterSave(_job_,_scm_)` will result in a simpler user interface of just enabling _Poll SCM_ and managing the hooks through _Ignore post-commit hooks_.
1493-
1494-
Additionally, unless a source control system can guarantee delivery of events, in order to ensure that events are not lost, users will need to configure _Poll SCM_ in any case (even if only with the schedule of `@yearly`!)
1495-
====
1496-
14971485
[TIP]
14981486
====
14991487
If you are implementing auto-registration of webhooks, keep a local database of what hooks have been attempted to be registered.

src/main/java/jenkins/scm/api/SCM2.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/main/java/jenkins/scm/impl/SCM2Notifier.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/main/java/jenkins/scm/impl/SCM2TransientActionFactory.java

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/test/java/jenkins/scm/impl/mock/MockSCM.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
import edu.umd.cs.findbugs.annotations.CheckForNull;
5353
import edu.umd.cs.findbugs.annotations.NonNull;
5454
import edu.umd.cs.findbugs.annotations.Nullable;
55-
import jenkins.scm.api.SCM2;
55+
import hudson.scm.SCM;
5656
import jenkins.scm.api.SCMHead;
5757
import jenkins.scm.api.SCMHeadOrigin;
5858
import jenkins.scm.api.SCMRevision;
@@ -64,7 +64,7 @@
6464
import org.kohsuke.stapler.QueryParameter;
6565
import org.xml.sax.SAXException;
6666

67-
public class MockSCM extends SCM2 implements Serializable {
67+
public class MockSCM extends SCM implements Serializable {
6868
private final String controllerId;
6969
private final String repository;
7070
private final SCMHead head;

0 commit comments

Comments
 (0)