@@ -43,7 +43,11 @@ export const writeToSheet = async (
4343 process . env . GITHUB_TOKEN
4444 ) ;
4545 }
46- await sendSlackWebhook ( sheetId , githubIssueUrl ) ;
46+ await sendSlackWebhook (
47+ sheetId ,
48+ githubIssueUrl ,
49+ formData . isOfficialFeed === "yes"
50+ ) ;
4751 return { message : "Data written to the new sheet successfully!" } ;
4852 } catch ( error ) {
4953 logger . error ( "Error writing to sheet:" , error ) ;
@@ -81,6 +85,7 @@ export enum SheetCol {
8185 UserInterview = "User interview email" ,
8286 DataProducerEmail = "Data producer email" ,
8387 OfficialProducer = "Are you the official producer or transit agency responsible for this data?" ,
88+ OfficialFeedSource = "Is Official Feed Source" ,
8489 ToolsAndSupport = "What tools and support do you use to create your GTFS data?" ,
8590 LinkToAssociatedGTFS = "Link to associated GTFS Schedule feed" ,
8691 LogoPermission = "Do we have permission to share your logo on https://mobilitydatabase.org/contribute?" ,
@@ -186,6 +191,7 @@ export function buildFeedRow(
186191 [ SheetCol . UserInterview ] : formData . userInterviewEmail ?? "" ,
187192 [ SheetCol . DataProducerEmail ] : formData . dataProducerEmail ?? "" ,
188193 [ SheetCol . OfficialProducer ] : formData . isOfficialProducer ,
194+ [ SheetCol . OfficialFeedSource ] : formData . isOfficialFeed ?? "" ,
189195 [ SheetCol . ToolsAndSupport ] : formData . whatToolsUsedText ?? "" ,
190196 [ SheetCol . LinkToAssociatedGTFS ] : formData . gtfsRelatedScheduleLink ?? "" ,
191197 [ SheetCol . LogoPermission ] : formData . hasLogoPermission ,
@@ -196,11 +202,20 @@ export function buildFeedRow(
196202 * Sends a Slack webhook message to the configured Slack webhook URL
197203 * @param {string } spreadsheetId The ID of the Google Sheet
198204 * @param {string } githubIssueUrl The URL of the created GitHub issue
205+ * @param {boolean } isOfficialSource Whether the feed is an official source
199206 */
200- async function sendSlackWebhook ( spreadsheetId : string , githubIssueUrl : string ) {
207+ async function sendSlackWebhook (
208+ spreadsheetId : string ,
209+ githubIssueUrl : string ,
210+ isOfficialSource : boolean
211+ ) {
201212 const slackWebhookUrl = process . env . SLACK_WEBHOOK_URL ;
202213 const sheetUrl = `https://docs.google.com/spreadsheets/d/${ spreadsheetId } /edit` ;
203214 if ( slackWebhookUrl !== undefined && slackWebhookUrl !== "" ) {
215+ let headerText = "New Feed Added" ;
216+ if ( isOfficialSource ) {
217+ headerText += " 🔹 Official Source" ;
218+ }
204219 const linksElement = [
205220 {
206221 type : "emoji" ,
@@ -237,7 +252,8 @@ async function sendSlackWebhook(spreadsheetId: string, githubIssueUrl: string) {
237252 type : "header" ,
238253 text : {
239254 type : "plain_text" ,
240- text : "New Feed Added" ,
255+ text : headerText ,
256+ emoji : true ,
241257 } ,
242258 } ,
243259 {
@@ -259,11 +275,11 @@ async function sendSlackWebhook(spreadsheetId: string, githubIssueUrl: string) {
259275 ] ,
260276 } ,
261277 {
262- " type" : "rich_text" ,
263- " elements" : [
278+ type : "rich_text" ,
279+ elements : [
264280 {
265- " type" : "rich_text_section" ,
266- " elements" : linksElement ,
281+ type : "rich_text_section" ,
282+ elements : linksElement ,
267283 } ,
268284 ] ,
269285 } ,
@@ -292,9 +308,12 @@ async function createGithubIssue(
292308) : Promise < string > {
293309 const githubRepoUrlIssue =
294310 "https://api.github.com/repos/MobilityData/mobility-database-catalogs/issues" ;
295- const issueTitle =
311+ let issueTitle =
296312 "New Feed Added" +
297313 ( formData . transitProviderName ? `: ${ formData . transitProviderName } ` : "" ) ;
314+ if ( formData . isOfficialFeed === "yes" ) {
315+ issueTitle += " - Official Feed" ;
316+ }
298317 const issueBody = buildGithubIssueBody ( formData , spreadsheetId ) ;
299318 try {
300319 const response = await axios . post (
@@ -353,7 +372,7 @@ export function buildGithubIssueBody(
353372 ${ formData . isUpdatingFeed === "yes" ? "Feed update" : "New feed" } ` ;
354373
355374 if ( formData . name ) {
356- content += `
375+ content += `
357376
358377 #### Name
359378 ${ formData . name } ` ;
0 commit comments