In preparation for supporting projects other than Git, let's stop using the defaultConfig and enforce an explicit configuration on the specific gitgitgadget-workflows repository where the GitHub workflows are supposed to run.
The idea is to store those project-specific settings in the CONFIG repository variable, in JSON format, and consume it in all of the GitHub workflow runs in that repository.
Additionally, that same repository variable will also be retrieved and integrated into gitgitgadget-github-app whenever it gets deployed as Azure Function. That way, also the GitHub App won't use hard-coded project-specific settings any longer.
The current CONFIG looks like this, by the way:
{
"repo": {
"name": "git",
"owner": "gitgitgadget",
"baseOwner": "git",
"testOwner": "dscho",
"owners": [
"gitgitgadget",
"git",
"dscho"
],
"branches": [
"maint",
"seen"
],
"closingBranches": [
"maint",
"master"
],
"trackingBranches": [
"maint",
"seen",
"master",
"next"
],
"maintainerBranch": "gitster",
"host": "github.com"
},
"mailrepo": {
"name": "git",
"owner": "gitgitgadget",
"branch": "master",
"host": "lore.kernel.org",
"url": "https://lore.kernel.org/git/",
"public_inbox_epoch": 1,
"mirrorURL": "https://github.com/gitgitgadget/git-mailing-list-mirror",
"mirrorRef": "refs/heads/lore-1",
"descriptiveName": "lore.kernel/git"
},
"mail": {
"author": "GitGitGadget",
"sender": "GitGitGadget",
"smtpUser": "gitgitgadget@gmail.com",
"smtpHost": "smtp.gmail.com"
},
"app": {
"appID": 12836,
"installationID": 195971,
"name": "gitgitgadget",
"displayName": "GitGitGadget",
"altname": "gitgitgadget-git"
},
"lint": {
"maxCommitsIgnore": [
"https://github.com/gitgitgadget/git/pull/923"
],
"maxCommits": 30
},
"user": {
"allowUserAsLogin": false
},
"syncUpstreamBranches": [
{
"sourceRepo": "gitster/git",
"targetRepo": "gitgitgadget/git",
"sourceRefRegex": "^refs/heads/(maint-\\d|[a-z][a-z]/)"
},
{
"sourceRepo": "j6t/git-gui",
"targetRepo": "gitgitgadget/git",
"targetRefNamespace": "git-gui/"
}
]
}
You will note the addition of the mail.smtpUser and mail.smtpHost attributes, as well as the syncUpstreamBranches one.
In preparation for supporting projects other than Git, let's stop using the
defaultConfigand enforce an explicit configuration on the specificgitgitgadget-workflowsrepository where the GitHub workflows are supposed to run.The idea is to store those project-specific settings in the
CONFIGrepository variable, in JSON format, and consume it in all of the GitHub workflow runs in that repository.Additionally, that same repository variable will also be retrieved and integrated into
gitgitgadget-github-appwhenever it gets deployed as Azure Function. That way, also the GitHub App won't use hard-coded project-specific settings any longer.The current
CONFIGlooks like this, by the way:{ "repo": { "name": "git", "owner": "gitgitgadget", "baseOwner": "git", "testOwner": "dscho", "owners": [ "gitgitgadget", "git", "dscho" ], "branches": [ "maint", "seen" ], "closingBranches": [ "maint", "master" ], "trackingBranches": [ "maint", "seen", "master", "next" ], "maintainerBranch": "gitster", "host": "github.com" }, "mailrepo": { "name": "git", "owner": "gitgitgadget", "branch": "master", "host": "lore.kernel.org", "url": "https://lore.kernel.org/git/", "public_inbox_epoch": 1, "mirrorURL": "https://github.com/gitgitgadget/git-mailing-list-mirror", "mirrorRef": "refs/heads/lore-1", "descriptiveName": "lore.kernel/git" }, "mail": { "author": "GitGitGadget", "sender": "GitGitGadget", "smtpUser": "gitgitgadget@gmail.com", "smtpHost": "smtp.gmail.com" }, "app": { "appID": 12836, "installationID": 195971, "name": "gitgitgadget", "displayName": "GitGitGadget", "altname": "gitgitgadget-git" }, "lint": { "maxCommitsIgnore": [ "https://github.com/gitgitgadget/git/pull/923" ], "maxCommits": 30 }, "user": { "allowUserAsLogin": false }, "syncUpstreamBranches": [ { "sourceRepo": "gitster/git", "targetRepo": "gitgitgadget/git", "sourceRefRegex": "^refs/heads/(maint-\\d|[a-z][a-z]/)" }, { "sourceRepo": "j6t/git-gui", "targetRepo": "gitgitgadget/git", "targetRefNamespace": "git-gui/" } ] }You will note the addition of the
mail.smtpUserandmail.smtpHostattributes, as well as thesyncUpstreamBranchesone.