We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c71b4de commit a9aa871Copy full SHA for a9aa871
src/main.rs
@@ -34,8 +34,6 @@ use tempfile::NamedTempFile;
34
35
const TARGET: &str = env!("TARGET");
36
37
-const BLOG_PRIMARY_BRANCH: &str = "master";
38
-
39
struct Context {
40
work: PathBuf,
41
handle: Easy,
@@ -904,8 +902,9 @@ impl Context {
904
902
};
905
903
906
let mut token = github.token(repository_for_blog)?;
+ let blog_repo = token.repository()?;
907
token.create_file(
908
- BLOG_PRIMARY_BRANCH,
+ &blog_repo.default_branch,
909
&format!(
910
"posts/inside-rust/{}-{}-prerelease.md",
911
chrono::Utc::now().date_naive().format("%Y-%m-%d"),
0 commit comments