File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ Information on the format: https://backstage.io/docs/features/software-catalog/d
5151
5252## Usage
5353
54+ https://www.notion.so/infinitaslearning/2b26b4290cc84d95ad3e93c3255277a1?v=8648fdba9c0b4fe08d680cefa9825174
55+
5456This is typically deployed as a scheduled action:
5557
5658``` yaml
7072 github_token : ${{ secrets.PAT_GITHUB_TOKEN }}
7173 notion_token : ${{ secrets.NOTION_TOKEN }}
7274 database : 2b26b4290cc84d95ad3e93c3255277a1
73- segment_database : ' 7943615f4dba43b3a3b0f991f4f7136d'
74- team_database : ' c11736fe61b941149de098676bde8d92'
75- system_database : ' 121534684fe840a1953500e603c2b602'
75+ segment_database : 7943615f4dba43b3a3b0f991f4f7136d
76+ team_database : c11736fe61b941149de098676bde8d92
77+ system_database : 121534684fe840a1953500e603c2b602
7678 repository_type : all
7779 catalog_file : catalog-info.yaml
7880
Original file line number Diff line number Diff line change @@ -245,10 +245,32 @@ try {
245245 } )
246246 }
247247
248+ const systems = processRows ( systemRows ) || null
249+ const teams = processRows ( teamRows ) || null
250+ const segments = processRows ( segmentRows ) || null
251+ let error = false
252+
253+ if ( segmentDb && ! segments . unknown ) {
254+ error = true
255+ core . error ( 'Your segment table does not contain an "unknown" row!' )
256+ }
257+ if ( teamDb && ! teams . unknown ) {
258+ error = true
259+ core . error ( 'Your team table does not contain an "unknown" row!' )
260+ }
261+ if ( systemDb && ! systems . unknown ) {
262+ error = true
263+ core . error ( 'Your system table does not contain an "unknown" row!' )
264+ }
265+
266+ if ( error ) {
267+ process . exit ( 1 )
268+ }
269+
248270 return {
249- systems : systemDb ? processRows ( systemRows ) : null ,
250- segments : segmentDb ? processRows ( segmentRows ) : null ,
251- teams : teamDb ? processRows ( teamRows ) : null
271+ systems,
272+ segments,
273+ teams
252274 }
253275 }
254276
Original file line number Diff line number Diff line change @@ -2,14 +2,20 @@ const { spawn } = require('child_process')
22const path = require ( 'path' )
33const process = require ( 'process' )
44
5- process . env . INPUT_DATABASE = 'cecaf0beb15945158d155866ff9acce8' // '2b26b4290cc84d95ad3e93c3255277a1'
65process . env . INPUT_NOTION_TOKEN = process . env . NOTION_TOKEN
76process . env . INPUT_GITHUB_TOKEN = process . env . GITHUB_TOKEN
87process . env . INPUT_REPOSITORY_TYPE = 'public'
98process . env . INPUT_GITHUB_OWNER = 'infinitaslearning'
10- process . env . INPUT_SEGMENT_DATABASE = '7943615f4dba43b3a3b0f991f4f7136d'
11- process . env . INPUT_TEAM_DATABASE = 'c11736fe61b941149de098676bde8d92'
12- process . env . INPUT_SYSTEM_DATABASE = '121534684fe840a1953500e603c2b602'
9+
10+ // process.env.INPUT_DATABASE = 'cecaf0beb15945158d155866ff9acce8' // '2b26b4290cc84d95ad3e93c3255277a1'
11+ // process.env.INPUT_SEGMENT_DATABASE = '7943615f4dba43b3a3b0f991f4f7136d'
12+ // process.env.INPUT_TEAM_DATABASE = 'c11736fe61b941149de098676bde8d92'
13+ // process.env.INPUT_SYSTEM_DATABASE = '121534684fe840a1953500e603c2b602'
14+
15+ process . env . INPUT_DATABASE = '2b26b4290cc84d95ad3e93c3255277a1' // '2b26b4290cc84d95ad3e93c3255277a1'
16+ process . env . INPUT_SEGMENT_DATABASE = '3ee0d01944924634990b42b44253d370'
17+ process . env . INPUT_TEAM_DATABASE = '9baf04c267054f0294aeab25026ce74f'
18+ process . env . INPUT_SYSTEM_DATABASE = 'c721d8f0e6e34961ba037c67ad632585'
1319
1420const ip = path . join ( __dirname , 'index.js' )
1521const options = {
You can’t perform that action at this time.
0 commit comments