Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-07-30 13:04:37 -0400
committerKevin Sawicki2012-07-30 13:04:37 -0400
commit3bc3381b86e70d58c53b728a0d13092a0105fe21 (patch)
treed0026c879730b62be3b12ac43445118c1cc0ccfa
parentd86f041d7fbc55c6c47213895da65974673125e5 (diff)
downloadegit-github-3bc3381b86e70d58c53b728a0d13092a0105fe21.tar.gz
egit-github-3bc3381b86e70d58c53b728a0d13092a0105fe21.tar.xz
egit-github-3bc3381b86e70d58c53b728a0d13092a0105fe21.zip
Use a POST instead of a PUT when editing repository hooks
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
index d4b76d25..e4a392e3 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
@@ -573,7 +573,7 @@ public class RepositoryServiceTest {
RepositoryHook hook = new RepositoryHook();
hook.setId(5006);
service.editHook(repo, hook);
- verify(client).put("/repos/o/n/hooks/5006", hook, RepositoryHook.class);
+ verify(client).post("/repos/o/n/hooks/5006", hook, RepositoryHook.class);
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
index d74e091c..8d2a2cae 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
@@ -904,7 +904,7 @@ public class RepositoryService extends GitHubService {
uri.append('/').append(id);
uri.append(SEGMENT_HOOKS);
uri.append('/').append(hook.getId());
- return client.put(uri.toString(), hook, RepositoryHook.class);
+ return client.post(uri.toString(), hook, RepositoryHook.class);
}
/**

Back to the top