Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(services/github): add github contents support #4281

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

hoslo
Copy link
Contributor

@hoslo hoslo commented Feb 28, 2024

Part #4253

core/Cargo.toml Outdated Show resolved Hide resolved
core/src/services/github_contents/core.rs Outdated Show resolved Hide resolved
core/src/services/github_contents/core.rs Outdated Show resolved Hide resolved
core/src/services/github_contents/core.rs Outdated Show resolved Hide resolved
core/src/services/github_contents/core.rs Outdated Show resolved Hide resolved
core/src/services/github_contents/core.rs Outdated Show resolved Hide resolved
@hoslo hoslo force-pushed the add-github-contents branch 2 times, most recently from 6188cd4 to 37aa6a7 Compare February 28, 2024 08:48
@hoslo
Copy link
Contributor Author

hoslo commented Feb 28, 2024

@Xuanwo When disable create_dir, op.create_dir("test/") will report this error

{"message":"path cannot end with a slash","errors":[{"resource":"Commit","field":"path","code":"invalid"}],"documentation_url":"https://docs.github.com/rest/repos/contents#create-or-update-file-contents"}

core/src/services/github/core.rs Outdated Show resolved Hide resolved
core/src/services/github/core.rs Outdated Show resolved Hide resolved
core/src/services/github/core.rs Outdated Show resolved Hide resolved
core/src/services/github/core.rs Outdated Show resolved Hide resolved
@@ -422,6 +425,7 @@ impl From<Scheme> for &'static str {
Scheme::Postgresql => "postgresql",
Scheme::Mysql => "mysql",
Scheme::Gdrive => "gdrive",
Scheme::Github => "github_contents",
Copy link
Member

Choose a reason for hiding this comment

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

not updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

core/src/types/scheme.rs Outdated Show resolved Hide resolved
@Xuanwo
Copy link
Member

Xuanwo commented Feb 28, 2024

When disable create_dir, op.create_dir("test/") will report this error

Sad, let's create test/.gitkeep instead.

@Xuanwo Xuanwo changed the title feat(services/github_contents): add github contents support feat(services/github): add github contents support Feb 28, 2024
@hoslo
Copy link
Contributor Author

hoslo commented Feb 28, 2024

.gitkeep

Should we remove .gitkeep from the list return?

@Xuanwo
Copy link
Member

Xuanwo commented Feb 28, 2024

Should we remove .gitkeep from the list return?

Yes, we can ignore .gitkeep (not remove)

@hoslo hoslo force-pushed the add-github-contents branch 5 times, most recently from acc8590 to fbccaa2 Compare February 28, 2024 10:15
@hoslo hoslo force-pushed the add-github-contents branch 2 times, most recently from 3cb04fa to 771c40c Compare February 29, 2024 04:06
@hoslo hoslo force-pushed the add-github-contents branch from 771c40c to c90785d Compare February 29, 2024 04:07
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit f6f7700 into main Feb 29, 2024
241 of 244 checks passed
@Xuanwo Xuanwo deleted the add-github-contents branch February 29, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants