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

Support for private repos #27

Merged
merged 3 commits into from
Nov 18, 2023

Conversation

Cyberboss
Copy link
Member

@Cyberboss Cyberboss commented Sep 25, 2023

  • Use GitHub API for downloading files.
  • Use installation token when cloning and fetching repositories.
  • Remove unused function.

Untested, tell me how.

Closes #26

Copy link
Member Author

@Cyberboss Cyberboss left a comment

Choose a reason for hiding this comment

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

I need to update the remote to use the current token when fetching too otherwise the original could expire

@Cyberboss Cyberboss marked this pull request as draft September 25, 2023 04:44
@optimumtact
Copy link

pretty sure you can have ilke 1 free privat repo on github these days for testing purposes.

@AffectedArc07
Copy link
Member

pretty sure you can have ilke 1 free privat repo on github these days for testing purposes.

You can have infinite

@Cyberboss Cyberboss marked this pull request as ready for review October 5, 2023 20:37
@Cyberboss
Copy link
Member Author

Created some local test cases. Should work fine without issue

- Use GitHub API for downloading files.
- Use installation token when cloning and fetching repositories.
- Remove unused function.
crates/mapdiffbot2/src/runner.rs Outdated Show resolved Hide resolved
crates/mapdiffbot2/src/job_processor.rs Outdated Show resolved Hide resolved
crates/mapdiffbot2/src/job_processor.rs Outdated Show resolved Hide resolved
@Cyberboss
Copy link
Member Author

This fucked up in prod so I gotta figure that out too

@Cyberboss Cyberboss marked this pull request as draft October 30, 2023 01:25
@Cyberboss
Copy link
Member Author

Tested and working!

@Cyberboss Cyberboss marked this pull request as ready for review November 18, 2023 08:07
@DisturbHerb
Copy link

worth the weight 🏋️‍♂️

let data = download_url(installation, repo, &filename, &commit).await?;
file.write_all(&data).await?;
Ok(path)
/* local test requires commenting out the .installation(...) call in find_content(), a valid github token with access, and the following dep: actix-rt = "2.9.0"
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

nah, it could be used for reference for testing

@AffectedArc07 AffectedArc07 merged commit fc3e7c1 into spacestation13:master Nov 18, 2023
1 check passed
@Cyberboss Cyberboss deleted the PrivateRepoSupport branch November 18, 2023 15:54
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.

[IDB + MDB] Feature request: support for private repositories
5 participants