mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
feat: lacking config tips, close #2695
This commit is contained in:
@@ -9,16 +9,12 @@ module.exports = async (ctx) => {
|
||||
|
||||
const fileUrl = `https://github.com/${user}/${repo}/commits/${branch}/${filepath}`;
|
||||
|
||||
const reqParams = {
|
||||
sha: branch,
|
||||
path: filepath,
|
||||
};
|
||||
if (config.github.access_token) {
|
||||
reqParams.access_token = config.github.access_token;
|
||||
}
|
||||
|
||||
const res = await got.get(`https://api.github.com/repos/${user}/${repo}/commits`, {
|
||||
params: reqParams,
|
||||
params: {
|
||||
sha: branch,
|
||||
path: filepath,
|
||||
access_token: config.github && config.github.access_token,
|
||||
},
|
||||
});
|
||||
const list = res.data;
|
||||
const count = [];
|
||||
|
||||
Reference in New Issue
Block a user