Skip to content

Conversation

shzhzichen
Copy link
Contributor

What does this PR do

add feishu connector

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

"url": "http://coco.rs/connectors/feishu",
"assets": {
"icons": {
"default": "/assets/icons/connector/feishu/icon.png"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also commit the icon files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// connect handles the OAuth authorization request
func (h *Plugin) connect(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
// Get datasource ID from query parameters
datasourceID := req.URL.Query().Get("datasource_id")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to use utils buildin with framework to get parameters h.GetParameter()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is requred, use MustGetParameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Build redirect_uri from request context instead of hardcoded config.
Supports multi-environment deployments automatically.
Add feishu icon.
- Dynamic redirect_uri support for multi-environment deployment
- Complete refresh_token expiry handling
- Fix OAuth scope issues with Feishu API
- Enhanced documentation with permission requirements
@shzhzichen shzhzichen force-pushed the feat/feishu-connector branch from ea077d6 to 2ca38e4 Compare August 29, 2025 09:01
@medcl
Copy link
Member

medcl commented Sep 1, 2025

@shzhzichen, I've noticed an issue with the icon, The format appears to be incorrect, which is causing them to display improperly.
I'm also encountering an issue with the data source connector. It appears the UI for adding the connector is not functioning correctly—I'm seeing this error:
b428d933-dbb4-4f07-b788-902002237ab2
This is preventing the connection from being established.

@shzhzichen
Copy link
Contributor Author

1、The icon issue has been resolved. The data source connection requires frontend collaboration for development, and the data source needs to be configured with authentication information. For specific parameters, please refer to the README.

2、Since the Feishu and Lark connectors are highly similar, the code structure has been redesigned to be compatible with both Feishu and Lark connectors.

@shzhzichen
Copy link
Contributor Author

image I think this is the main difference compared with other connectors. May I ask if this design is reasonable and acceptable?

@medcl
Copy link
Member

medcl commented Sep 1, 2025

the google drive use client side oauth to get the access token, and should be similar thing
image

@shzhzichen
Copy link
Contributor Author

Okay, I will revise it again according to this structure.

@medcl
Copy link
Member

medcl commented Sep 2, 2025

the icon size should 64x64

@shzhzichen
Copy link
Contributor Author

They are all 64x64, so there’s no problem.
image

@medcl
Copy link
Member

medcl commented Sep 2, 2025

image ok, it should be an icon like this: image

@shzhzichen
Copy link
Contributor Author

ok, all done

@medcl
Copy link
Member

medcl commented Sep 11, 2025

@shzhzichen it seems the content of the docs are extracted.

@shzhzichen
Copy link
Contributor Author

@medcl Yes, I will use Postman to test the creation of data sources and the querying of document lists before submitting the PR.

@medcl
Copy link
Member

medcl commented Sep 11, 2025

@shzhzichen you can merge the code from main, i have added the UI to manage the datasource/conenctor for feishu/lark.

@medcl
Copy link
Member

medcl commented Sep 11, 2025

use make build-all to build all the stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants