@@ -49,6 +49,11 @@ const localizationStrings = {
4949 file_a_bug : "Nota un bug" ,
5050 participate : "Participe:" ,
5151 } ,
52+ fr : {
53+ file_a_bug : "Signaler un problème" ,
54+ participate : "Participer :" ,
55+ commit_history : "Historique des modifications" ,
56+ } ,
5257 de : {
5358 commit_history : "Revisionen" ,
5459 file_a_bug : "Fehler melden" ,
@@ -100,7 +105,27 @@ export async function run(conf) {
100105 }
101106 const branch = ghConf . branch || "gh-pages" ;
102107 const issueBase = new URL ( "./issues/" , ghURL ) . href ;
103- const newIssuesURL = new URL ( "./new/choose" , issueBase ) . href ;
108+ let newIssuesURL ;
109+ if (
110+ typeof conf . github === "object" &&
111+ conf . github . hasOwnProperty ( "newIssuesURL" )
112+ ) {
113+ try {
114+ const url = new URL ( String ( conf . github . newIssuesURL ) ) ;
115+ if ( url . protocol !== "https:" ) {
116+ const msg = docLink `${ "[github.newIssuesURL]" } must use HTTPS. (${ String ( conf . github . newIssuesURL ) } ).` ;
117+ rejectGithubPromise ( msg ) ;
118+ return ;
119+ }
120+ newIssuesURL = url . href ;
121+ } catch {
122+ const msg = docLink `${ "[github.newIssuesURL]" } is not a valid URL. (${ String ( conf . github . newIssuesURL ) } ).` ;
123+ rejectGithubPromise ( msg ) ;
124+ return ;
125+ }
126+ } else {
127+ newIssuesURL = new URL ( "./new/choose" , issueBase ) . href ;
128+ }
104129
105130 // Allow custom pullsURL and commitHistoryURL for monorepo scenarios
106131 let pullsURL ;
@@ -166,8 +191,8 @@ export async function run(conf) {
166191 }
167192 }
168193
194+ /** @type {Record<string, any> } */
169195 const newProps = {
170- edDraftURI : `https://${ org . toLowerCase ( ) } .github.io/${ repo } /` ,
171196 githubToken : undefined ,
172197 githubUser : undefined ,
173198 issueBase,
@@ -176,6 +201,9 @@ export async function run(conf) {
176201 pullBase : pullsURL ,
177202 shortName : repo ,
178203 } ;
204+ if ( ! conf . hasOwnProperty ( "edDraftURI" ) ) {
205+ newProps . edDraftURI = `https://${ org . toLowerCase ( ) } .github.io/${ repo } /` ;
206+ }
179207 // Assign new properties, but retain existing ones
180208 let githubAPI = "https://respec.org/github" ;
181209 if ( conf . githubAPI ) {
0 commit comments