This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // import_cursor_usage.js | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const dotenv = require('dotenv'); | |
| const { Client } = require('pg'); | |
| const axios = require('axios'); | |
| const { parseISO, format, isAfter } = require('date-fns'); | |
| dotenv.config(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // import_tabnine_usage.js | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const dotenv = require('dotenv'); | |
| const { Client } = require('pg'); | |
| const axios = require('axios'); | |
| const { parseISO, format, isAfter } = require('date-fns'); | |
| dotenv.config(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fs from 'fs'; | |
| import path from 'path'; | |
| import dotenv from 'dotenv'; | |
| import { Client } from 'pg'; | |
| import csvParser from 'csv-parser'; | |
| dotenv.config(); | |
| const validateEnvVars = () => { | |
| const requiredVars = ["DX_DB_CONNECTION"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| module CustomerScripts | |
| class BeesJsmIncidentImport | |
| extend Callable | |
| def call | |
| incidents = unprocessed_incidents | |
| if incidents.empty? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Jira Worklog Retrieval Script | |
| // | |
| // PURPOSE: | |
| // Sync Jira worklogs into Postgres, keeping both individual entries | |
| // and total time summaries accurate and up to date. | |
| // | |
| // BEHAVIOR: | |
| // • Connects securely to Postgres using provided credentials. | |
| // • Fetches worklogs for all eligible completed subtasks. | |
| // • Inserts new worklog entries and updates existing ones when changes are detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl https://api.getdx.com/events.track -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -H "Authorization: Bearer <API Token>" \ | |
| -d '{ | |
| "name": "pr.merged", | |
| "email": "[email protected]", | |
| "timestamp": "1743320276", | |
| "metadata": { | |
| "repository": "dx-platform", | |
| "pull_request_id": 1234, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fs from 'fs'; | |
| import dotenv from 'dotenv'; | |
| import pkg from 'pg'; | |
| const { Client } = pkg; | |
| import fetch from 'node-fetch'; | |
| import { DateTime } from 'luxon'; | |
| dotenv.config(); | |
| const DX_DB_CONNECTION = process.env.DX_DB_CONNECTION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require "csv" | |
| require "json" | |
| require "time" | |
| class BackfillIncidentsJob | |
| include Sidekiq::Job | |
| sidekiq_options retry: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fs from 'fs'; | |
| import dotenv from 'dotenv'; | |
| import pkg from 'pg'; | |
| const { Client } = pkg; | |
| import fetch from 'node-fetch'; | |
| import { DateTime } from 'luxon'; | |
| dotenv.config(); | |
| const DX_DB_CONNECTION = process.env.DX_DB_CONNECTION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onst { Client } = require('pg'); | |
| const axios = require('axios'); | |
| // Set debug mode | |
| const debug = true; // Set to false to make actual API calls | |
| // Database connection string | |
| const connectionString = [CONNECTION STRING FROM DX] | |
| // Create a new PostgreSQL client |