Skip to content

Commit 78c6c3c

Browse files
committed
Extend the IConfig interface as needed for 3rd-party projects
In my endeavor to support projects other than Git, I am currently adapting GitGitGadget to allow sending Cygwin PRs to the Cygwin-patches mailing list. I identified a couple of gaps in the project configuration when setting up stuff in https://github.com/cygwingitgadget. Let's close those gaps. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent a4fe4d8 commit 78c6c3c

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

lib/gitgitgadget-config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const defaultConfig: IConfig = {
2727
mail: {
2828
author: "GitGitGadget",
2929
sender: "GitGitGadget",
30+
smtpUser: "gitgitgadget@gmail.com",
31+
smtpHost: "smtp.gmail.com",
3032
},
3133
app: {
3234
appID: 12836,
@@ -42,6 +44,18 @@ const defaultConfig: IConfig = {
4244
user: {
4345
allowUserAsLogin: false,
4446
},
47+
syncUpstreamBranches: [
48+
{
49+
sourceRepo: "gitster/git",
50+
targetRepo: "gitgitgadget/git",
51+
sourceRefRegex: "^refs/heads/(maint-\\d|[a-z][a-z]/)",
52+
},
53+
{
54+
sourceRepo: "j6t/git-gui",
55+
targetRepo: "gitgitgadget/git",
56+
targetRefNamespace: "git-gui/",
57+
},
58+
],
4559
};
4660

4761
export default defaultConfig;

lib/project-config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export interface IConfig {
3535
mail: {
3636
author: string;
3737
sender: string;
38+
smtpUser: string;
39+
smtpHost: string;
3840
};
3941
project?: projectInfo | undefined; // project-options values
4042
app: {
@@ -51,6 +53,12 @@ export interface IConfig {
5153
user: {
5254
allowUserAsLogin: boolean; // use GitHub login as name if name is private
5355
};
56+
syncUpstreamBranches: Array<{
57+
sourceRepo: string; // e.g. "gitster/git"
58+
targetRepo: string; // e.g. "gitgitgadget/git"
59+
sourceRefRegex?: string; // e.g. "^refs/heads/(maint-\\d|[a-z][a-z]/)"
60+
targetRefNamespace?: string; // e.g. "git-gui/"
61+
}>; // branches to sync from upstream to our repo
5462
}
5563

5664
let config: IConfig; // singleton

0 commit comments

Comments
 (0)