This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new c1e0310a6 docs: page and pageSize should not be required (#6452)
c1e0310a6 is described below

commit c1e0310a6b965e9f6e64e54a709690bf1a8f6b95
Author: Klesh Wong <[email protected]>
AuthorDate: Tue Nov 14 15:04:40 2023 +0800

    docs: page and pageSize should not be required (#6452)
    
    * docs: page and pageSize should not be required
    
    * feat: skip building plugins when DEVLAKE_PLUGINS=none
---
 backend/scripts/build-plugins.sh      | 6 ++++++
 backend/server/api/apikeys/apikeys.go | 9 +++++----
 backend/server/api/project/project.go | 4 ++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/backend/scripts/build-plugins.sh b/backend/scripts/build-plugins.sh
index 5a92bce93..3c31404e6 100755
--- a/backend/scripts/build-plugins.sh
+++ b/backend/scripts/build-plugins.sh
@@ -34,6 +34,12 @@ echo "Usage: "
 echo "  build all plugins:              $0 [golang build flags...]"
 echo "  build and keep specified plugins only: DEVLAKE_PLUGINS=github,jira $0 
[golang build flags...]"
 
+
+if [ "$DEVLAKE_PLUGINS" = "none" ]; then
+    echo "skip building plugins" > &2
+    exit 0
+fi
+
 ROOT_DIR=$(dirname $(dirname "$0"))
 EXTRA=""
 PLUGIN_SRC_DIR=$ROOT_DIR/plugins
diff --git a/backend/server/api/apikeys/apikeys.go 
b/backend/server/api/apikeys/apikeys.go
index c8d307052..4c24967ea 100644
--- a/backend/server/api/apikeys/apikeys.go
+++ b/backend/server/api/apikeys/apikeys.go
@@ -18,14 +18,15 @@ limitations under the License.
 package apikeys
 
 import (
+       "net/http"
+       "strconv"
+
        "github.com/apache/incubator-devlake/core/errors"
        "github.com/apache/incubator-devlake/core/models"
        "github.com/apache/incubator-devlake/impls/logruslog"
        "github.com/apache/incubator-devlake/server/api/shared"
        "github.com/apache/incubator-devlake/server/services"
        "github.com/gin-gonic/gin"
-       "net/http"
-       "strconv"
 )
 
 type PaginatedApiKeys struct {
@@ -36,8 +37,8 @@ type PaginatedApiKeys struct {
 // @Summary Get list of api keys
 // @Description GET /api-keys?page=1&pageSize=10
 // @Tags framework/api-keys
-// @Param page query int true "query"
-// @Param pageSize query int true "query"
+// @Param page query int false "query"
+// @Param pageSize query int false "query"
 // @Success 200  {object} PaginatedApiKeys
 // @Failure 400  {string} errcode.Error "Bad Request"
 // @Failure 500  {string} errcode.Error "Internal Error"
diff --git a/backend/server/api/project/project.go 
b/backend/server/api/project/project.go
index 9e4b9e543..3bd9f573f 100644
--- a/backend/server/api/project/project.go
+++ b/backend/server/api/project/project.go
@@ -56,8 +56,8 @@ func GetProject(c *gin.Context) {
 // @Summary Get list of projects
 // @Description GET /projects?page=1&pageSize=10
 // @Tags framework/projects
-// @Param page query int true "query"
-// @Param pageSize query int true "query"
+// @Param page query int false "query"
+// @Param pageSize query int false "query"
 // @Success 200  {object} PaginatedProjects
 // @Failure 400  {string} errcode.Error "Bad Request"
 // @Failure 500  {string} errcode.Error "Internal Error"

Reply via email to