This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch release-v0.20
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.20 by this push:
new 150d20664 docs: page and pageSize should not be required (#6452)
(#6453)
150d20664 is described below
commit 150d206642d72ee99990cb92de281e518b45dfc1
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 14 15:34:35 2023 +0800
docs: page and pageSize should not be required (#6452) (#6453)
* docs: page and pageSize should not be required
* feat: skip building plugins when DEVLAKE_PLUGINS=none
Co-authored-by: Klesh Wong <[email protected]>
---
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"