å¹´ã®ç¬ã§ãããã¯ãªã¹ãã¹ã®è¶³é³ãè¿ãããã¶ãªãããé ¼ãã ãæ¯æ°ãè¯ãããªã¨æã£ãã®ã§ãGitHub ä¸ã§ Issues ãçããã¨ãã¶ãé ¼ããä»çµã¿ï¼workflowsï¼ãæ§ç¯ãã¦ã¿ã¾ããã
æè§ã®ã¢ãã«ã¬ã®æ©ä¼ã§ããããGitHub ä¸ã§ãã¶ãé ¼ãã¾ã§ã®éç¨ããGitHub ã Web æè¡ããã¶çã«æããæ¹ã«ããããã§ãªãæ¹ã«ãã楽ãã¿ããã ããããã«èª¬æ*1*2ãé²ãã¦ããã¾ã*3ãå°ãé·ããªãã¾ãããã©ãããä»ãåããã ããã
ãã¶
çªç¶ã§ãããã¿ãªãã¾ã¯ãã¶ã¨å¼ã°ããé£ã¹ç©ããåç¥ã§ããããï¼ åãã¦ãã¶ãã覧ã«ãªãããæ¹ã«åãã¦èª¬æãã¦ããã¨ãå°éº¦ç²çãç·´ã£ã¦æ§æããçå°ãåå½¢ã«ä¼¸ã°ãããããã½ã¼ã¹ããã¼ãºãæ§ã ãªå ·æãè¼ãã¦ãã¾ã©ã§ç¼ãããã¤ã¿ãªã¢çºç¥¥ã®æçãæãã¾ãã
æãå½ã«ããããã¶ã®æä¾ææ³ã¨ãã¦ã¯å® é ãã¶ã大ããªå½¹å²ãå ãã¦ãã¾ãããã¦ã代表çãªå® é ãã¶ãã§ã¼ã³ã§ãããããã»ãã¶ããã¶ã¼ã©ããã¶ãããã¯ãWeb ãµã¤ã*4ã®æè¡ã¹ã¿ãã¯*5ãåºã«å¤§ããåºåãããã¨ãã§ãã¾ãã
ãããã»ã㶠| ãã¶ã¼ã© | ãã¶ããã | |
---|---|---|---|
ã¢ã¼ããã¯ã㣠| SPA | SPA ãããªãï¼MPAï¼ | SPA |
ãã¬ã¼ã ã¯ã¼ã¯ | React | ASP.NET | Vue.js |
ããã§ãã¼ã¯ã¼ãã¨ãªãã®ã SPAï¼Single Page Applicationï¼ã§ããSPA ã¯ãMPA*6ã¨ç§°ãããä¼çµ±ç㪠Web ãµã¤ãã¨ã¯ç°ãªãã表示é¨åï¼ãã¥ã¼ï¼ã§ããããã³ãã¨ã³ãã¨ããã¼ã¿ç®¡çããã¸ãã¯ãå¦çããããã¯ã¨ã³ããåé¢ããå¾åã«ããã¾ããå¾æ¥ã® MPA ãããã°ã©ããã«ã«æä½ããã«ã¯ã¹ã¯ã¬ã¤ãã³ã°çã®æä½ãè¦æ±ããã¾ãããSPA ã§ã¯ããæå³ API ã丸裸ã®ç¶æ ã«ãªã£ã¦ãããã*7ãæä½ããããã¨ããã°æä½ããããããã§ã*8ã
MAP/SPA ã®è§£èª¬ã«ã¤ãã¦ã¯ã以ä¸ã®ãã¼ã¸ã«æ²è¼ããã¦ããå³ãåèã«ãªãã¾ãã
ä»åã¯ãããã»ãã¶ã対象ã¨ãã¦ãGitHub Actions ãçµç±ãã注æã試ã¿ã¾ããæµ·å¤ã®ããããã¶ã§ã¯ãæ¢ã«æå¿ã«ãã API ã©ãããéçºããã*9ãªã©ãæè¡ã¨ã®è¦ªåæ§ãé«ããã¨ã§ã馴æã¿ã§ãã
ãããã»ãã¶ãæ¯ããæè¡
ドミノ・ピザの注文サイトãéã㦠Google Chrome ã®ããããããã¼ã«ã観å¯ããã¨ãä½ãã https://olo-graph-at.dominos.jp/graphql ã® URL ã«å¯¾ãã¦é »ç¹ã«ãªã¯ã¨ã¹ããéä¿¡ãã¦ãããã¨ã解ãã¾ãã
ããã«ã¯ GraphQL ã¨å¼ç§°ããã API è¨è¨ææ³ãç¨ãããã¦ãããåä¸ã®ã¨ã³ããã¤ã³ã*10ã«å¯¾ãã¦ã¯ã¨ãªè¨èª*11ãç¨ãã¦åãåãããè¡ããã¨ã§æ å ±ãåå¾ãã¦ãã¾ãã試ãã«ãcurl ã³ãã³ããç¨ãã¦ãä¸è¨ã®ã¨ã³ããã¤ã³ãã«å¯¾ãã¦æ¬¡ã®ã¯ã¨ãªï¼åãåããï¼ãæãã¦ã¿ã¾ãã
curl 'https://olo-graph-at.dominos.jp/graphql' \ -H 'content-type: application/json' \ -H 'dpe-application: MobileWeb' \ -H 'dpe-country: JP' \ -H 'dpe-language: ja' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ --data-raw $'{"operationName":"offersQuery","variables":{"storeNo":87634,"serviceMethod":"Delivery","tradingTime":"2023-11-25T12:00:00+09:00"},"query":"query offersQuery($storeNo: Int\u0021, $tradingTime: String, $serviceMethod: ServiceMethodEnum\u0021, $orderId: String, $deliveryAddress: DeliveryAddressInput, $layouts: [Layouts]) { offers( storeNo: $storeNo tradingTime: $tradingTime serviceMethod: $serviceMethod orderId: $orderId deliveryAddress: $deliveryAddress layouts: $layouts) { offerId name items {id name price} media {name description}}}"}'
åãåããã®çµæã¨ãã¦ãä¸è¨ã®ã¬ã¹ãã³ã¹ãå¾ããã¾ãããquery offersQuery
ã¯ã©ãããã¯ã¼ãã³æ
å ±ãåå¾ããã¯ã¨ãªã®ããã§ããã㶠30 % ãªãã¨ãããã
{ "data": { "offers": [ { "offerId": "99968", "name": "1ãããã¼Sãµã¤ãºãã¶990åï½ï¼2ãããã¼ï¼200å 3ãããã¼ï¼300å 4ãããã¼ï¼400åã»Mãµã¤ãºï¼300å Lãµã¤ãºï¼600åï¼", "items": [ { "id": "5fe3905f-885d-4228-9fb9-843ef9e735fb", "name": "1ãããã¼Sãµã¤ãºãã¶990åï½ï¼2ãããã¼ï¼200å 3ãããã¼ï¼300å 4ãããã¼ï¼400åã»Mãµã¤ãºï¼300å Lãµã¤ãºï¼600åï¼", "price": null } ], "media": { "name": "1ãããã¼Sãµã¤ãºãã¶990åï½ï¼2ãããã¼ï¼200å 3ãããã¼ï¼300å 4ãããã¼ï¼400åã»Mãµã¤ãºï¼300å Lãµã¤ãºï¼600åï¼", "description": "1ãããã¼Sãµã¤ãºãã¶990åï½ï¼2ãããã¼ï¼200å 3ãããã¼ï¼300å 4ãããã¼ï¼400åã»Mãµã¤ãºï¼300å Lãµã¤ãºï¼600åï¼" } }, ..., { "offerId": "14638", "name": "Upsell Panel #4-1 Flex Web Voucher for Delivery", "items": [ { "id": "27476", "name": "ãã¶1æï¼ãµã¤ã2å", "price": "ï¿¥2099ï½" }, { "id": "27477", "name": "ãã¶2æï¼ãµã¤ã2å", "price": "ï¿¥3599ï½" }, { "id": "27478", "name": "ãã¶3æï¼ãµã¤ã3å", "price": "ï¿¥4699ï½" } ], "media": { "name": "ããã¯ãªããããã»ãã", "description": "" } } ] } }
調æ»ã®çµæããããã»ãã¶ã® SPA ã¯æ³¨æã¾ã§ã®å ¨ã¦ã®éä¿¡*12ã« GraphQL ãæ¡ç¨ãã¦ãã¾ããããã®æåãèªã¿è§£ããã¨ãã§ããã°ãå ¬å¼ã«æä¾ãããã¤ã³ã¿ãã§ã¼ã¹ãä»ããã¨ããã¶ã注æã§ãããã§ãã
æ¡å¤è¤éãªãã¶ãã¡ã¤ã³ç¥è
å®
é
ãã¶ã®æ³¨æã«ããã¦ã¯ãã¾ã注æããååãé¸æããå·¥ç¨ãçºçãããããæå§ãã«æä¾ãããã¡ãã¥ã¼æ
å ±ãåå¾ããå¿
è¦ãããã¾ã*13ã調ã¹ãã¨ãããã¡ãã¥ã¼æ
å ±ã¯ query MenuQuery
ãç¨ãã¦åå¾ããã¦ãã¾ããããã®ã¯ã¨ãªã®å®è¡çµæã¯ã大ã¾ãã«ä»¥ä¸ã®ãã£ã¼ã«ã*14ããæ§æããã¾ãã
menuTransitional - pages: ã«ãã´ãªï¼ãã¶ããã¤ãããããµã¤ãã¡ãã¥ã¼çï¼ - sections: ååã®ç¨®é¡ - items: åå - sizes: ãµã¤ãºï¼ãµã¤ãºæ¦å¿µãåå¨ããªãå ´å㯠1 ã¤ã®ã¿ï¼ - swaps: ã¦ã¼ã¶ãé¸æå¯è½ãªåè£ - base: çå° - sauce: ã½ã¼ã¹ - toppings: ãããã³ã° - options: ãªãã·ã§ã³
æçµçãªæ³¨ææã«è¦æ±ãããæ
å ±ã¯ã注æããååã® item, size, swaps ãæå®ããã³ã¼ãï¼IDï¼ã§ããæã
ã¯ãã¶ã«ããé¢å¿ããªãã®ã§ãpages ã«é¢ãã¦ã¯ãpages.code
ã Menu.Pizza, Menu.MyBox
ã®ããããã§ããè¦ç´ ããã£ã«ã¿ãªã³ã°ããã°è¯ãããã§ãããã®ãã¡ãä»åã¯å¦çã®ç°¡ç¥åã®ããã«ãã¤ããã*15ï¼ã㶠S ãµã¤ãº + ãªãã·ã§ã³ 2 ç¹ã®ã»ããï¼ã«ç¦ç¹ãçµãã¾ã*16ã
ãããã®åãåãã + åå¾ãããã¼ã¿ã®æ´å½¢ããTypeScriptï¼å®è¡ç°å¢ã¯ Node.jsï¼ãç¨ãã¦ã³ã¼ãã£ã³ã°ãã¦ããã¾ããGraphQL ã¯ã©ã¤ã¢ã³ãã«ã¯ graphql-request ããAPI ã®ã¢ãã¯*17ã«ã¯ MSW(Mock Service Worker)ã使ç¨ãã¾ãã
GitHub
çªç¶ã§ãããã¿ãªãã¾ã¯ GitHub*18 ã¨å¼ã°ãã Web ãµã¼ãã¹ããåç¥ã§ããããï¼ GitHub ã¯ã½ããã¦ã§ã¢éçºãã©ãããã©ã¼ã ã«ãããããã¡ã¯ãã¹ã¿ã³ãã¼ãã®åå¨ã§ãgit*19 ãç¨ããã½ã¼ã¹ã³ã¼ã管çãã³ã¡ã³ããã¬ãã¥ã¼ãéçãµã¤ããã¹ãã£ã³ã°çã®å¤å½©ãªæ©è½ãæä¾ããã¦ãã¾ãã
ä»å㯠GitHub ä¸ã«ãããã»ãã¶å°ç¨ã®ãªãã¸ããªã¨ã㦠inaniwaudon/pizza*20 ãä½æãããªãã¸ããªå ã« Issue*21 ãç«ã¦ããã¨ã§ç¨ãã¦ãã¶ã注æãã¾ããå ·ä½çã«ã¯ä»¥ä¸ã«ç¤ºãããã¼ã«åºã¥ãã¦ãbot ã¨ã®å¯¾è©±ãç¹°ãè¿ããªãã注ææ å ±ã確å®ããã¾ãã
ååã®é¸æã«ã¯ããã§ãã¯ããã¯ã¹ã表示ãã¦ã¿ã¹ã¯ã管çããタスクリストæ©è½ã転ç¨ãã¾ããGFMï¼GitHub GitHub Flavoredï¼ä¸ã§ãã§ãã¯ããã¯ã¹ã¯ - [ ]
ã¨è¡¨è¨ãããã¦ã¼ã¶ããã§ãã¯ãä»ããã¨ããã - [x]
ã¸ã¨å¤åãã¾ãã
GitHub Actions
GitHub ä¸ã§æä¾ãããå¼·åãªæ©è½ã®ä¸ã¤ã«ãGitHub Actions ãããã¾ãããã㯠CI/CD*22ã®å®è¡åºç¤ã¨ãã¦åå¨ãã¦ãããã¯ã¼ã¯ããã¼ã¨ç§°ãããå¦çãå®ç¾©ãããã¨ã§ãæ§ã ãªæ¡ä»¶ãå¥æ©ã«å¦çãèªåå®è¡ãããã¨ãå¯è½ã¨ãªãã¾ããè¦ã¯ GitHub ãæä¾ããè¨ç®è³æºãç¨ã㦠*23ã¬ã³ã¬ã³èªååãã¦ããããï¼ï¼ã¿ãããªæ©è½ã§ããããããprivate repository ã§ã¯ç¡ææ 㧠2,000 åï¼æã¾ã§ãpublic repository ã§ããã°ç¡å¶éã«å©ç¨å¯è½ã¨ãã太ã£è ¹*24ã£ã·ããä»åã¯ãã®æ©è½ãç¨ãã¦ãä¸è¨ããã¼ã®ãã¡ bot é¨åãå®è£ ãã¾ãã
ã¯ã¼ã¯ããã¼ã®å®ç¾©
ã¯ã¼ã¯ããã¼ã¯ YAML*25 ã¨ããè¨èªãç¨ãã¦ãjobs â steps ã®é層æ§é ãæã£ã¦è¨è¿°ããã¾ããä¾ã¨ãã¦ããã Issue ã open ãããå ´åã«ãã¶ã®ã¡ãã¥ã¼ãåå¾ãã¦ããã®çµæãå½è©² Issue ã«ã³ã¡ã³ãããã¯ã¼ã¯ããã¼ã以ä¸ã«ç¤ºãã¾ãã
name: issue-opened on: issues: types: [opened] jobs: ci: runs-on: ubuntu-latest permissions: issues: write contents: read steps: - name: Checkout uses: actions/checkout@v4 - name: Setup node.js uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Use cache uses: actions/cache@v3 id: node_cache with: path: "**/node_modules" key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies if: ${{ steps.node_cache.outputs.cache-hit != 'true' }} run: yarn install --frozen-lockfile - name: Get welcome message run: | { echo 'welcome<<EOF' npx ts-node ./src/index.ts welcome echo EOF } >> $GITHUB_ENV - name: Get menu run: | { echo 'menu<<EOF' npx ts-node ./src/index.ts menu echo EOF } >> $GITHUB_ENV - name: Add comment run: | gh issue comment "$NUMBER" --repo "$REPO" --body "$welcome" gh issue comment "$NUMBER" --repo "$REPO" --body "$menu" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NUMBER: ${{ github.event.issue.number }} REPO: ${{ github.repository }}
ã¯ã¼ã¯ããã¼ä¸ã§ã¯ãsrc/index.ts ãå¼ã³åºããå®è¡çµæã gh コマンドãç¨ãã¦ã³ã¡ã³ãã¨ãã¦æ稿ãã¦ãã¾ããç°å¢å¤æ°ã¯ã¹ããããè·¨ãã§å
±æãããã¨ãã§ããªããããts-node ã®å®è¡çµæ㯠GITHUB_ENV
ã«æ ¼ç´ãã¾ã*26ã
å®éã« Issue ãç«ã¦ãããã¯ã¼ã¯ããã¼ãå®è¡ãããã¨ä»¥ä¸ã®ã³ã¡ã³ããæ稿ããã¾ãã
ç¹å®ã®ã³ã¡ã³ãã«ã®ã¿åå¿ãã¦å¦çãå®è¡ãããã¨ãå¯è½ã§ããã¯ã¼ã¯ããã¼ã«æ¬¡ã®è¨è¿°ã追å ããã¨ãã次ã¸ãã®æåãå«ã¾ããã³ã¡ã³ãã«å¯¾ãã¦ã®ã¿å¦çãéè¡ããããã«ãªãã¾ãã
- run: | if [[ "${{ github.event.comment.body }}" != *"次ã¸"* ]]; then exit 1 fi
é¸æç¶æ ãåå¾ãã
ã¯ã¼ã¯ããã¼ã¯ç¬ç«ãã¦å®è¡ããããããåç°å¢ã«è·¨ã£ã¦ã³ã³ããã¹ããå ±æããä»çµã¿ã¯ããã¾ãããå¾ã£ã¦ãä»åã¯ã³ã¡ã³ãä¸ã«ãã³ãï¼ãã¼ã¹ãé©å®ç¹°ãè¿ãã¦ãã¦ã¼ã¶ãå ¥åããæ å ±ã以åå¦çããå 容ã次ã®ã¯ã¼ã¯ããã¼ã¸ã¨å¼ãç¶ããã¨ã«ãã¾ãããIssue ã®åå¾ã«ã¯ãGitHub ãå ¬å¼ã«æä¾ããã©ã¤ãã©ãªã§ãã Octokit ã Node.js ä¸ã§å®è¡ãã¾ãã
åå¾ããã³ã¡ã³ãã®æ¬æä¸ãããã§ãã¯ããã¯ã¹ãé¸æããã¦ããè¡ãåå¾ããã«ã¯ãæ£è¦è¡¨ç¾ãç¨ã㦠- \[x\] (.+?)
ãæ½åºãã¾ããä¸è¨ã®ã½ã¼ã¹ã³ã¼ãã«ç¤ºãé¢æ°ã§ã¯ãé¸æä¸ã®ååã³ã¼ãã®åå¾ãå®ç¾ããã¦ãã¾ãããã®è¾ºãã¯ãã°ãçã¿ãããã®ã§å
¥å¿µã«ãã¹ãã³ã¼ã*27ãæ¸ãå¿
è¦ãããããã§ãã
export const parseItemSelectionCodes = (comment: string): SelectionCode[] => { const lines = comment.split("\n"); const searchItem = (i: number) => { const sizeResult = /- \[x\] ((.+?): .+)?ï¼ï¿¥\d+ï¼/.exec(lines[i]); if (!sizeResult) return; for (let j = i - 1; j >= 0; j--) { const itemResult = /#### (\d+): .+/.exec(lines[j]); if (itemResult) { return { item: itemResult[1], size: sizeResult[1] ? sizeResult[2] : null, }; } } }; return lines.flatMap((_, i) => searchItem(i) ?? []); };
ãã¤ãããã注æããå ´åã¯ãªãã·ã§ã³ã 2 ã¤é¸ã¶å¿ è¦ããããããã¾ãååã®é¸æç»é¢ã表示ããç¶ãã¦ãªãã·ã§ã³ã®é¸æãä¿ããã§ãã¯ããã¯ã¹ãæ示ãã¾ãããã§ãã¯ãä»ãã¦å度ã次ã¸ããå ¥åããã¨ãé éå ä½æãé£çµ¡å ã«ã¤ãã¦ãå ¥åãæ±ããå¾ãåæ§ã«ãã¼ã¹ãã¦åå¾ãã¾ããã¾ãã決æ¸é¢é£ã¯ç¾éæ¯æãã«åºå®ãã¾ãã
注æã確å®ããã
æå¾ã«ãé¸æããååãé éå ä½æãéä¿¡ãã¦æ³¨æã確å®ããå¿ è¦ãããã®ã§ããããããæãã¬é£å±ã§ããã注æ確å®å¨ãã«é¢ãã¦ãAPI ã®æåã注è¦ãããã¨ã§å¾ãããæ¨å¯ããã²ã¨ã¾ãç®æ¡æ¸ãã§åæãã¾ã*28ã
- ã«ã¼ãå
容ã¯ã注æ確å®æã¾ã§ãã¼ã«ã«ã«ä¿åããã¦ããã
- minify ãããã³ã¼ãããããã観å¯ããã¨ãlocalStorage å
ã®
persist:dominosApplication
ã«ã«ã¼ãå 容ã IDãã»ãã·ã§ã³çã®æ å ±ãä¿æããã¦ããã - ä¸èº«ã¯ãã¤ããªãç¶æ
管çã« Redux ãæ¡ç¨ããã¦ãããState ã®ç¶æãå§ç¸®ãç®çã¨ã㦠redux-persist-transform-compress ãç¨ãããã¦ããã
lz-string.decompressFromUTF16(str)
ã§ãã³ã¼ãå¯è½ã - ãã¼ã¸ãªãã¼ãæã«ãã«ã¼ãå 容ã復å ãã¹ã LocalStorage ã®å 容ãåç §ããããµã¼ãå´ããã«ã¼ãå 容ãåå¾ãããããªéä¿¡ã¯ããã®æ®µéã§ã¯ç¹ã«è¦åããããªãã
- minify ãããã³ã¼ãããããã観å¯ããã¨ãlocalStorage å
ã®
mutation validateBusket
ãå®è¡ãã¦ãã«ã¼ãå 容ãæ¤è¨¼ï¼ããªãã¼ã·ã§ã³ï¼ãããä¸ããå¤ãæ£å¸¸ãªå ´åã¯ããµã¼ãå´ã§è¨ç®ããã注æç·é¡çãåå¾ãããã- variables ã®
id
,advanceOrderId
ã¨ã㦠UUID (v4) ãéä¿¡ãããé©å½ã«çæãã UUID ãä¸ãã¦ãæãããªãã productCode
çã«ååã¨ãã¦åå¨ããªãã³ã¼ããä¸ããã¨ãååã販売ä¼æ¢ä¸ã§ããæ¨ãvalidationErrors
ã«è¿ãããã- validateBusket ã¯åº¦ã å¼ã°ãã¦ããï¼ååã®ã«ã¼ã追å æãä½æå ¥åæçï¼ãä½æçã®å ¥åãæ±ããããã®ã¯æå¾ã®ç»é¢ã§ãããããã«ã¼ã追å æã«ã¯ä½æã®æ å ±ã¯æ¬ æãã¦ããã
- variables ã®
mutation validateBusket
ã®å®è¡å¾ã«query orderQuery
ã«åä¸ã® UUID ã渡ãã¨ãvalidateBusket ã§ä¸ããå 容ãå¾ãããã- å¾ã£ã¦
mutation validateBusket
ã¯ã«ã¼ãå 容ãæ¤è¨¼ãããã®å 容ã UUID ã«ç´ã¥ãã¦ãµã¼ãå´ã«ä¿ç®¡ããå½¹å²ãæ ãã¨èããããã
- å¾ã£ã¦
- æå¾ã«ã
mutation placeOrder
ã§æ³¨æã確å®ããï¼ããããã解ã£ã¦ããªãï¼ã
åé¡ã¨ãªãã®ã¯ mutation placeOrder
ã®å¼æ°ã«ä¸ãã入力型ï¼input typeï¼ã§ããminify ãããã³ã¼ããèªã¿è§£ãã¨ãID ã決æ¸æ
å ±ãä¸ããå¿
è¦ããããã¨ã¯æ¼ ç¶ã¨å¤æãããã®ã®ãå
·ä½çãªã¹ãã¼ãã«é¢ãã¦ã¯ææãããå¾ãããªãç¶æ
ãç¶ãã¦ãã¾ãã*29ããããªãã¨å®éã® API ã³ã¼ã«ãç£è¦ããã®ãæã£åãæ©ãã®ã§ããããã®ã¯ã¨ãªãå¼ã°ããããã«ã¯ãå®éã«æ±ºæ¸ãèµ°ããã¦ãã¶ã注æããå¿
è¦ãããã¾ãããããã»ãã¶ã®ãã¶ã¡ãã¥ã¼ã¯æä½ã§ã 1,310 åãã¾ãã®ã§ãç¡éã«æ³¨æãã¦ãã¦ã¯ç ´ç£ã¾ã£ãããã§ãã
ââå¨å²ã®ååã«ããå²ãåã«è½ã¨ãè¾¼ããã¨ã«æåãããã®é*31ã®æ³¨æãã¼ã¸ã® Network ã¿ãããã³ããããã¨ã«ãããã¶æ³¨æã¸ã®å®å ¨ãªç解ãå¾ããã¨ãã§ãã¾ãããã¡ãªã¿ã« LT ã§ç¨ããè³æã¯ä»¥ä¸ã®ã¹ã©ã¤ãã«ãªãã¾ãã
ãããããã
注æ確å®ã«éãã¦ã¯ãä¸è¨ 3 ã¯ã¨ãªãé ã«æãããã¨ã§å¦çãéè¡ããã¦ãã¾ãããå種 ID ãã¯ã©ã¤ã¢ã³ããµã¤ãã§çæããã¦ãããã¨ã«ã¯é©ããé ãã¾ããã
- ã«ã¼ãå
容ã®æ´æ°ï¼
mutation validateBusket
ãå®è¡ãããé©å½ã«æ¡çªãã UUID ã§ããid
,advanceOrderId
ãå¼æ°ã«ä¸ããã - 決æ¸å¦çï¼ï¼
mutation initialiseOrder
ãå®è¡ãããé©å½ã«æ¡çªãã UUID ã§ããorderPaymentId
ãå¼æ°ã«ä¸ããã - 注æ確å®ï¼
mutation placeOrder
ãå®è¡ãããå¼æ°ã«å ç¨ã¨åä¸ã®id
,orderPaymentId
ãä¸ããã
ãã¶ãã©ãã«ã¼
å ¬å¼ãµã¤ãã«ã¯ããã¶ã®è¡æ¹ããªã¢ã«ã¿ã¤ã ã§è¡¨ç¤ºãããピザトラッカーãªãæ©è½ãå®è£ ããã¦ãã¾ãããã®ä»æ§ã調æ»ããã¨ããã以ä¸ã«ç¤ºãäºæãå¤æãã¾ããã
- é²æç¶æ³ã 8 ã¤ã®ç¶æ
ã«åºåãã
Basket
ï¼æ³¨æä¸ï¼,Pending
ï¼å¾ æ©ä¸ï¼,SentToStore
ï¼åºèéä¿¡ä¸ï¼,Making
ï¼èª¿çä¸ï¼,Cooking
ï¼ç¼æä¸ï¼,Ready
ï¼é éæºåä¸ï¼,Leaving
ï¼é éä¸ï¼,Complete
ï¼é éå®äºï¼
- Making 以éã«ãªãã¨ãETAï¼å°çäºå®æå»ï¼ã æçâæé· ã®å½¢å¼ã§è¡¨ç¤ºãããã
- ãããã®æ
å ±ã¯
query OrderQuery
ã§åå¾å¯è½ãeta ã¯å½å null ã§ããã
å°çäºå®æå»ã Issue ä¸ã«ã表示ãããã¨å¬ããããã§ããããããåå¾ããã«ã¯ä¸å®ééã§ç¹°ãè¿ãåãåãããå®è¡*32ããªããã°ãªãã¾ããã以ä¸ã®ææ³ãç¨ããå®ææ´æ°ãæ¤è¨ãã¾ããããæ§ã ãªäºæ ããä»å㯠workflow_dispatch ã«ããæåå®è¡ã§é éç¶æ³ã確èªãããã¨ã«ãã¾ããã
- schedule ããªã¬ãç¨ãã¦å®æå®è¡ï¼cronï¼ãã
- 注æä¸ä»¥å¤ãå®æã«ã¯ã¼ã¯ããã¼ãå®è¡ããããªã½ã¼ã¹ãç¡é§ã«æ¶è²»ããããã¾ã遅延が生じる可能性ãããã
- å¤é¨ãµã¼ãã¹ã«ä¾åãã
- Cloudflare Workers ã® Cron Triggers çãå©ç¨ãããKV çã§æ³¨æä¸ã§ããããä¸æã管çããå¿ è¦ããããGitHub ä¸ã§å®çµããªããªã£ã¦ãã¾ãã®ã§ä»åã¯è¦éãã
- Issue ã close ããããã¯ã¼ã¯ããã¼ãåé¤ãã
- ä¸ç¬è¯ãããã«æãããä¸è¿°ã®éãé 延åé¡ãããã®ã§å´ä¸ã
ãããã¦ãã¶æ³¨æã«å¿ è¦ãª API ã®è§£æã¨ãã¯ã¼ã¯ããã¼ã®å®è£ *33ãçµããã¾ãããããã§ããã¶ã®æ³¨æã«å¿ è¦ãªæä½éã®ã¯ã¨ãªå¼ã³åºããæ¹ãã¦å³ç¤ºãã¦æ´çãã¾ãã
ãã¨ã¯ Issue ãç«ã¦ã¦ãå®éã«é ¼ãã§ã¿ãã ãã§ãï¼
å®éã«ãã£ã¦ã¿ã
ãã¶ã®é¸æãé éå ä½æã®å ¥åãå ¨ã¦ã¯é 調ã«äºãéãã§ãããä»åº¦ããââããããæå¾ ã«è¸ãè¨ãã¾ããªãããCI ã®åä½ã«ç®ãè½ã¨ãã
ä¸åã¯ãã®å¾ãé»ã ã¨ã¨ã©ã¼ã®åæã«å¤ããã ã
çé¢ã®ãã£ã¤ã ãé¨å±ã«è½ãã
ã¨ããããã§ãã¶ã®æ³¨æã«æåãã¾ããï¼ äºåã®æ¤è¨¼ã§ãã°ãåãåããã¨ãã§ãããæå¾ã®æ³¨æç»é¢ã§å ¥ååã®ã¨ã©ã¼ã«è¦èããã¾ãããã4 åã®è©¦è¡ãçµã¦ç¡äºã«æ³¨æãããã¨ãã§ãã¾ãããç¾å®ã¨ãã½ã³ã³ãç¹ãã£ãæ°ããã¦å¬ããã£ãã§ãã
ããã³ã«ããã¦
éã³ã®ä¸ç°ã§å§ãã¾ããããé²ãã¦ããã¨äºæ³ä»¥ä¸ã«èå³æ·±ãå±éã¨ãªããã®ããã£ãã§ãããã¶ã«è©³ãããªããããã° API ã®è§£æããå§ããã¨ããã¶ã«å¯¾ãã解å度ãä¸ãã£ã¦è¯ãããããªãããªã¨æãã¾ãã
ææã¨ãã¦ãå ¬å¼ãµã¤ãã¯é常ã«åªããè¨è¨ã§ããã¨æãã¾ãããä¾ãã°ã表示å 容ã»ã¬ã¤ã¢ã¦ãã»ç»åã»ã¢ã¤ã³ã³çã¯ãã¹ã¦ GraphQL å´ã«æ å ±ãå¯ãããã¦ãããããã³ãå´ã«ãã¼ãã³ã¼ãã£ã³ã°ãããè¦ç´ ã¯ããªãå°ãªãã£ãã§ããããã«æè»æ§ãé«ããä»å¾ãã¶ã«å ãã¦å¯¿å¸ã売ããï¼ãªã©ã®å±éã«ãªã£ãéã«ãã大è¦æ¨¡ãªæ¹ä¿®ä½æ¥ãçµãã«ååã追å å¯è½ãªãã®ã¨æããã¾ã*37ãæ¬ç¨¿ã§ã¯åãä¸ãã¾ããã§ããããå ¬å¼ã§ã¯ãã¼ãã¢ã³ããã¼ãçã®å¤ç¨®å¤æ§ãªã¡ãã¥ã¼ã®æ³¨æãå½ç¶åãä»ãã¦ãããè¤éãªãã¡ã¤ã³*38ã«å¯¾å¿ããããã« GraphQL ãä¸æãé§ä½¿ãã¦ããã¨ããå°è±¡ãåãã¾ããã
ä»å¾ã®å±æ
ä»å¾ã®å±æã¨ãã¦ãå®è£ äºå®ã®æ©è½ãæãã¦ããã¾ãï¼å¤åãããªãï¼ã
- é«éå
- ã¡ãã¥ã¼æ å ±çã¯ãã£ãã·ã¥çã«æããããã¨ã§é«éåãå®ç¾ãããã
- ãã¤ããã以å¤ã®ãã¶ããè¤æ°ååã®æ³¨æã«å¯¾å¿
- ãããã³ã°ã¸ã®å¯¾å¿
- ã¤ã³ã¿ãã§ã¼ã¹ã®æ¹å
- ãã¶æã®ã«ã¼ã¬ãããã¼ãã®çµæã«å¿ãã¦ãã¶ã注æãããä»çµã¿ãªã©
- ç¾é以å¤ã®æ±ºæ¸æ段ã¸ã®å¯¾å¿
ãã¾ãã³ã¼ããæ¸ããªããã¡ã®æ å ±ã¡ãã£ã¢åµæå¦é¡ã§ãããããã°ã©ã ãã¡ãã£ã¨æ¸ããã¨æ¥ã ã®çæ´»ããã便å©ã«æ¥½ãããããã¦è±ãã«ãããã¨ãã§ããã¨æãã¾ããmast Advent Calendar 2023 ã¯ã¯ãªã¹ãã¹ã¾ã§ç¶ãã¦ããã¾ãã®ã§ãä»å¾ã®è¨äºã«ããæå¾ ãã ãã*39ï¼
è¨äºä¸ã«ç»å ´ãããµã¼ãã¹ãéå¶ä¼ç¤¾ã¨ã¯ä¸åé¢ä¿ãããã¾ãããæ¬ç¨¿ã¯æè¡æ¤è¨¼ãç®çã¨ããè¨äºã§ãããè¨äºä¸ã®ããã°ã©ã ã»æé ã¯ãã¹ã¦èªå·±è²¬ä»»ã§å®è¡ãã¦ãã ãããã¾ãé度㪠API ã³ã¼ã«ãªã©ãåºå´ã«è¿·æã¨ãªããããªè¡çºã¯å³ãã«æ ããããé¡ããããã¾ãã
*1:åå¦è åãã®å®å ¨ãªè§£èª¬ã¯æµç³ã«é£ããã®ã§ãé°å²æ°ã ãã§ãæ´ãã§ããã ããã°ã¨ãã趣æ¨ã§ã
*2:æè¡çã«ä¸æ£ç¢ºãªè¨è¿°ãããããããã¾ããã許ãã¦ãã½ã
*3:Zenn ã«æ¸ãã®ãã¢ã¬ã ãªãã¨æã£ã¦ã¯ã¦ãªããã°ã«æ¸ãã
*4:ããã§ã¯æ³¨æç¨ Web ãµã¤ããæã
*5:使ç¨æè¡ã®ãã¨
*6:Multiple Page Application. SPA ã¨åºå¥ããããã®ã¬ãããã
*7:ä¾ãã° Twitter ã® API é¨åã®éã« Twitter å é¨ã§å©ç¨ããã¦ãã API ãæ½åºãããªãã¸ããªãªã©ãåå¨ãã: https://github.com/tsukumijima/tweepy-authlib
*8:å©ç¨è¦ç´çã«ã¯ã°ã¬ã¼ãé度ãªå©ç¨ã¯æ§ãã¾ããã
*9:å½ç¶ã®ãã¨ãªãããæ¥æ¬å½å ã®æ³¨æãµã¤ãã¨ã¯ API ã®ä»æ§ãç°ãªãã£ã½ã
*10:API ã«ã¢ã¯ã»ã¹ãã URI ã®ãã¨
*11:ãã¼ã¿ã®åå¾ãæ´æ°ã«ç¨ããããè¨èª
*12:ãªã½ã¼ã¹ï¼ç»åçï¼ã®èªã¿è¾¼ã¿ã¯é¤ã
*13:ã1 æè²·ã㨠1 æç¡æãã«ä»£è¡¨ããããããªã¯ã¼ãã³æ å ±ãåå¨ãã¾ãããä»åã¯ç°¡åã®ããçç¥
*14:éã«è§£éããã¨ããã¼ã¿ãã®ãããªæå³
*15:ãããã»ãã¶æçæ å ±ã§ããããã¤ãããã¨ããã®ãé ¼ãã¨ä¸äººã§ãå®ããã¶ãé£ã¹ãããã£ã½ã
*16:å ¬å¼ã«æä¾ããã SPA ã§ã¯ãã·ã¥ãã¨ãã UI ãä»ãã¦ä½ãè¿·ããã¨ãªãåå注æã«è¾¿ãçããã®ã§ãããå é¨ã§æ±ããã¦ããã¹ãã¼ãã¯ããªãè¤éã§ãããã¨ã伺ãã¾ã
*17:ãã¹ããåä½ç¢ºèªã®åº¦ã« API ã«ãªã¯ã¨ã¹ããæããã¨ãç¸ææ¹ã«è² è·ãæããã»ãããã¹ãã®çµæçã API ã«ä¾åããã¨ããç¾è±¡ãçãã¦ãã¾ãã¾ãããããã®æ¸å¿µã解決ããããã«ãã¢ãã¯ã¨å¼ã°ãã API ã®ãããªæ¯ãèããããããã°ã©ã ãç¨æãã¾ã
*18:è¨è¨å³å ±æãµã¤ã
*19:ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã
*20:å人æ å ±ãæ±ããã private
*21:ã½ããã¦ã§ã¢ã«å¯¾ããã¢ã¤ãã¢ããã°ãè¦æçãè°è«ããå ´ãããã¿ã¹ã¯ç®¡ççã«ãç¨ãããã
*22:ãã¹ãããã«ãããããã¤çãèªåã§åããã¨
*23:å³å¯ã«ã¯Self-hosted Runner ãå¯è½ãå® é ã«ãæã¡å¸°ãã«ã対å¿ãããã¶æ¥çã¨æãã¬é¡ä¼¼ç¹
*24:ããã«æã å¦ç㯠GitHub Education ã«ç»é²ãããã¨ã§ç¡å㧠3,000 åï¼æã¾ã§å©ç¨å¯è½ãä»åã® CI ã®æ§ç¯ã§ã¯ãã®ãã¡ 600 åç¨åº¦ã®æ ã使ç¨ãã¾ãã
*25:ã¤ã ã«ãã¤ã¡ã«ã¨å¼ã°ãã¦ãã
*26:åãã¦ç¥ã£ãããã¯ã«ã§ãã¿ã¾ãã
*27:å¤ç¾©ãªè¨èã§ããããã®æèã§ããã¹ããã¨è¨ãã°ããã°ã©ã ã®åä½ãæ©æ¢°çã«æ¤è¨¼ãããã¨ãæã
*28:æ¥ã«åå¿è ç½®ãå»ãã«ãªã£ã¦ãã¾ãç³ã訳ãªã
*29:ã¤ã³ããã¹ãã¯ã·ã§ã³ãå¶éããã¦ãã
*30:Lightning Talks. 5 åçã®çãæéã§éã«ãã¬ã¼ã³ãã¼ã·ã§ã³ãè¡ãä¼
*31:ãã¶ã®é éãè¦ã¦ãããçã® Continuous Delivery ã ãã¿ãããªè©±ããã¦ãã
*32:å ¬å¼ã§ããã®ãããªå®è£
*33:詳細ãªå®è£ 㯠inaniwaudon-public-pizza ãåç §
*34:ã¨ã©ã¼æã«æ³¨æã¯åºèã«éä¿¡ãããªããã¨ã確èªãã¦ãããã御å®å¿ãã ãã
*35:åæ®ã£ã¦é°å²æ°ãåºã¦ãããã
*36:é«ã
*37:å®éã«ã§ãããã¯ä¸æ
*38:ããé åã«éå®ããç¥èã®ãã¨ããã¡ã¤ã³ç¥èã¨å¼ã¶ãç¾å®ä¸çã¯å¤§å¤ã ã
*39:12/23 ã«ããä¸åº¦å·çæ å½ãã¾ã