mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-03 13:30:51 +07:00
Update uncivbot.yml
This commit is contained in:
parent
3c2167f445
commit
c50e1da1fe
44
.github/workflows/uncivbot.yml
vendored
44
.github/workflows/uncivbot.yml
vendored
@ -15,27 +15,27 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: 50 });
|
||||
//var commitSummary = "";
|
||||
//var ownerToCommits = {}
|
||||
//var reachedPreviousVersion = false
|
||||
//result.data.forEach(commit => {
|
||||
// if(reachedPreviousVersion) return
|
||||
// var author = commit.author.login
|
||||
// if(author=="uncivbot[bot]") return
|
||||
// var commitMessage = commit.commit.message.split("\n")[0];
|
||||
// if(commitMessage.match(/^\d+\.\d+\.\d+$/)){ // match EXACT version, like 3.4.55 ^ is for start-of-line, $ for end-of-line
|
||||
// reachedPreviousVersion=true
|
||||
// console.log(commitMessage)
|
||||
// return
|
||||
// }
|
||||
// if(commitMessage.startsWith("Merge ")) return
|
||||
// commitMessage = commitMessage.replace(/\(\#\d+\)/,"") // match PR auto-text, like (#2345)
|
||||
// if (author != owner){
|
||||
// if (ownerToCommits.get(author)==undefined) ownerToCommits.set(author,[])
|
||||
// ownerToCommits.get(author)?.push(commitMessage)
|
||||
// }
|
||||
// else commitSummary += "\n\n" + commitMessage
|
||||
//});
|
||||
var commitSummary = "";
|
||||
var ownerToCommits = {}
|
||||
var reachedPreviousVersion = false
|
||||
result.data.forEach(commit => {
|
||||
if(reachedPreviousVersion) return
|
||||
var author = commit.author.login
|
||||
if(author=="uncivbot[bot]") return
|
||||
var commitMessage = commit.commit.message.split("\n")[0];
|
||||
if(commitMessage.match(/^\d+\.\d+\.\d+$/)){ // match EXACT version, like 3.4.55 ^ is for start-of-line, $ for end-of-line
|
||||
reachedPreviousVersion=true
|
||||
console.log(commitMessage)
|
||||
return
|
||||
}
|
||||
if(commitMessage.startsWith("Merge ")) return
|
||||
commitMessage = commitMessage.replace(/\(\#\d+\)/,"") // match PR auto-text, like (#2345)
|
||||
if (author != owner){
|
||||
if (ownerToCommits.get(author)==undefined) ownerToCommits.set(author,[])
|
||||
ownerToCommits.get(author)?.push(commitMessage)
|
||||
}
|
||||
else commitSummary += "\n\n" + commitMessage
|
||||
});
|
||||
//ownerToCommits.forEach((commits,author)=>{
|
||||
// commitSummary += "\n\nBy "+author+":"
|
||||
// commits.forEach(commitMessage => {commitSummary+="\n- "+commitMessage})
|
||||
@ -45,5 +45,5 @@ jobs:
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: toJson(result)
|
||||
body: commitSummary
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user