Skip to content

Commit

Permalink
update sth. at 2022-01-14 14:38:56
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhaiai committed Jan 14, 2022
1 parent 7b53d7b commit d124da3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/ff/jnezha/jnt/cs/GithubHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
public class GithubHelper {

private static final int DEF_TIMEOUT = 50 * 1000;
private static String token = System.getenv("GITHUB_TOKEN");


// public static void main(String[] args) {
// String token = System.getenv("GITHUB_TOKEN");
// updateContent("hhhaiai", "Git_result", "/tt/update.txt", token, "Java更新"
// , "Java[" + Jnt.VERSION + "]");
// }
public static String updateContent(String owner, String repo, String path, String contentWillBase64, String commitMsg) {
return updateContent(owner, repo, path, token, contentWillBase64, commitMsg);
}

/**
* <p>updateContent.</p>
Expand All @@ -43,8 +41,8 @@ public class GithubHelper {
* @param contentWillBase64 a {@link java.lang.String} object.
* @param commitMsg a {@link java.lang.String} object.
*/
public static void updateContent(String owner, String repo, String path, String token, String contentWillBase64, String commitMsg) {
updateContent(owner, repo, path, token, contentWillBase64, commitMsg, "", "");
public static String updateContent(String owner, String repo, String path, String token, String contentWillBase64, String commitMsg) {
return updateContent(owner, repo, path, token, contentWillBase64, commitMsg, "", "");
}

/**
Expand Down Expand Up @@ -89,6 +87,9 @@ public static String updateContent(String owner, String repo, String path, Strin
return "";
}

public static String deleteFile(String owner, String repo, String[] paths, String commitMsg) {
return deleteFile(owner, repo, paths, token, commitMsg);
}

public static String deleteFile(String owner, String repo, String[] paths, String token, String commitMsg) {
if (paths == null || paths.length < 1) {
Expand Down

0 comments on commit d124da3

Please sign in to comment.