mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-03 04:45:34 +07:00
Update uncivbot.yml
This commit is contained in:
parent
c50e1da1fe
commit
d082de4e16
36
.github/workflows/uncivbot.yml
vendored
36
.github/workflows/uncivbot.yml
vendored
@ -20,27 +20,27 @@ jobs:
|
||||
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
|
||||
});
|
||||
commitSummary += "\n\n" + commitMessage
|
||||
// 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})
|
||||
//})
|
||||
//context.github.issues.createComment(context.issue({ body: commitSummary }));
|
||||
})
|
||||
github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
|
Loading…
Reference in New Issue
Block a user