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

Less GitHub dependence #108

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Less GitHub dependence #108

merged 3 commits into from
Feb 15, 2024

Conversation

Hoverbear
Copy link
Contributor

@Hoverbear Hoverbear commented Feb 15, 2024

Furthers the cause of #107 and extracts out all the github-fetched data into src/cli/mod.rs for now, such that push_new_release and ReleaseMetadata::build are no longer dependent on the github related structs. This should make opening up other code forges easier.

There should be no material code changes here, only refactoring.

@Hoverbear Hoverbear self-assigned this Feb 15, 2024
@Hoverbear Hoverbear marked this pull request as ready for review February 15, 2024 18:43
Comment on lines +109 to +110
project_id: i64,
owner_id: i64,
Copy link
Member

Choose a reason for hiding this comment

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

what do we even do with these? Presumably we only trust the JWT derived ids on the server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct, I don't even see us deserializing these fields on the server, but I'm trying to keep this simple mechanical moves. Next PR is contentful. :)

Comment on lines +463 to +467
tracing::debug!(
"Getting revision count locally failed, using data from github instead"
);
github_graphql_data_result.rev_count
}
Copy link
Member

Choose a reason for hiding this comment

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

hmmm. not a blocker but can we just get rid of it completely? what scenarios does from_git_root fail, and does the rest of the push process still work even in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Generally github action clones are shallow if I recall? I'm not sure I remember. I'm hoping to get rid of querying this data entirely.

Copy link
Member

@colemickens colemickens left a comment

Choose a reason for hiding this comment

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

Looks good, don't want to get too carried away with ideas since I know there's more coming.

@Hoverbear Hoverbear merged commit 508b6de into main Feb 15, 2024
5 checks passed
@Hoverbear Hoverbear deleted the less-github-dependence branch February 15, 2024 21:16
@cole-h
Copy link
Member

cole-h commented Feb 15, 2024

FYI: this was reverted in #110 because it caused rolling version numbers to be calculated incorrectly.

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.

3 participants