-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Remove resolution field from staging/dev transitions to prevent … #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,89 @@ | ||||||
| #!/usr/bin/env node | ||||||
| /** | ||||||
| * List all custom fields in your Jira instance | ||||||
| * | ||||||
| * This script helps you discover the correct custom field IDs for your Jira instance. | ||||||
| * Run: node utils/list-custom-fields.js | ||||||
| */ | ||||||
|
|
||||||
| require('dotenv').config() | ||||||
| const Jira = require('../utils/jira') | ||||||
|
|
||||||
| async function listAllCustomFields () { | ||||||
| const { JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN } = process.env | ||||||
|
|
||||||
| if (!JIRA_BASE_URL || !JIRA_EMAIL || !JIRA_API_TOKEN) { | ||||||
| console.error('Error: Missing required environment variables') | ||||||
| console.error('Please ensure JIRA_BASE_URL, JIRA_EMAIL, and JIRA_API_TOKEN are set in your .env file') | ||||||
| process.exit(1) | ||||||
| } | ||||||
|
|
||||||
| const jiraUtil = new Jira({ | ||||||
| baseUrl: JIRA_BASE_URL, | ||||||
| email: JIRA_EMAIL, | ||||||
| apiToken: JIRA_API_TOKEN, | ||||||
| }) | ||||||
|
|
||||||
| try { | ||||||
| console.log('Fetching all custom fields from Jira...\n') | ||||||
|
|
||||||
| const response = await jiraUtil.request('/field') | ||||||
| const fields = await response.json() | ||||||
|
|
||||||
| // Filter for custom fields only | ||||||
| const customFields = fields.filter(field => field.id.startsWith('customfield_')) | ||||||
|
|
||||||
| console.log(`Found ${customFields.length} custom fields:\n`) | ||||||
| console.log('=' .repeat(100)) | ||||||
|
||||||
|
|
||||||
| // Group by name patterns we're looking for | ||||||
| const releaseFields = customFields.filter(f => | ||||||
| f.name.toLowerCase().includes('release') || | ||||||
| f.name.toLowerCase().includes('environment') || | ||||||
| f.name.toLowerCase().includes('timestamp') || | ||||||
| f.name.toLowerCase().includes('deploy') | ||||||
| ) | ||||||
|
|
||||||
| if (releaseFields.length > 0) { | ||||||
| console.log('\n🎯 RELEASE/DEPLOYMENT RELATED FIELDS:') | ||||||
| console.log('=' .repeat(100)) | ||||||
|
||||||
| console.log('=' .repeat(100)) | |
| console.log('='.repeat(100)) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra space in '=' .repeat(100). This should be '='.repeat(100) for consistent formatting.
| console.log('=' .repeat(100)) | |
| console.log('='.repeat(100)) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra space in '=' .repeat(100). This should be '='.repeat(100) for consistent formatting.
| console.log('=' .repeat(100)) | |
| console.log('='.repeat(100)) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,192 @@ | ||||||||||||||||||||||||||||||||||
| #!/usr/bin/env node | ||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||
| * Test script to verify custom field updates on a Jira issue | ||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||
| * This script tests the ability to update deployment-related custom fields | ||||||||||||||||||||||||||||||||||
| * on a specific Jira issue (DEX-36 by default) and optionally rolls back changes. | ||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||
| * Usage: | ||||||||||||||||||||||||||||||||||
| * node utils/test-custom-fields.js [ISSUE_KEY] | ||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||
| * Example: | ||||||||||||||||||||||||||||||||||
| * node utils/test-custom-fields.js DEX-36 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+9
to
+12
|
||||||||||||||||||||||||||||||||||
| * node utils/test-custom-fields.js [ISSUE_KEY] | |
| * | |
| * Example: | |
| * node utils/test-custom-fields.js DEX-36 | |
| * node tmp/test-custom-fields.js [ISSUE_KEY] | |
| * | |
| * Example: | |
| * node tmp/test-custom-fields.js DEX-36 |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example path references utils/test-custom-fields.js, but this file is located in tmp/. The path should be node tmp/test-custom-fields.js DEX-36.
| * node utils/test-custom-fields.js [ISSUE_KEY] | |
| * | |
| * Example: | |
| * node utils/test-custom-fields.js DEX-36 | |
| * node tmp/test-custom-fields.js [ISSUE_KEY] | |
| * | |
| * Example: | |
| * node tmp/test-custom-fields.js DEX-36 |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template literal has an extra space before '='.repeat(80). This should be \n${'='.repeat(80)} for consistent formatting.
| console.log(`\n${ '='.repeat(80)}`) | |
| console.log(`\n${'='.repeat(80)}`) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template literal has trailing spaces after '='.repeat(80). This should be ${'='.repeat(80)}\n for consistent formatting.
| console.log(`${'='.repeat(80) }\n`) | |
| console.log(`${'='.repeat(80)}\n`) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template literal has trailing spaces after '='.repeat(80). This should be ${'='.repeat(80)}\n for consistent formatting.
| console.log(`${'='.repeat(80) }\n`) | |
| console.log(`${'='.repeat(80)}\n`) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template literal has an extra space before '='.repeat(80). This should be \n${'='.repeat(80)} for consistent formatting.
| console.log(`\n${ '='.repeat(80)}`) | |
| console.log(`\n${'='.repeat(80)}`) |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template literal has trailing spaces after '='.repeat(80). This should be ${'='.repeat(80)}\n for consistent formatting.
| console.log(`${'='.repeat(80) }\n`) | |
| console.log(`${'='.repeat(80)}\n`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage path references
utils/list-custom-fields.js, but this file is located intmp/. The path should benode tmp/list-custom-fields.js.