Skip to content

Instantly share code, notes, and snippets.

@awsvpc
awsvpc / update_issues.py
Created July 4, 2024 01:23 — forked from ogawatti/update_issues.py
Update Issues (Create and Update, Close)
# -*- coding: utf-8 -*-
import boto3
import json
import base64
import urllib
import urllib2
import pdb
## lambdaへアップロードする前に書き換えて下さい
@awsvpc
awsvpc / github_issues_to_jira_tickets.py
Created July 4, 2024 01:22 — forked from atharvai/github_issues_to_jira_tickets.py
migration script for open Github issues to JIRA Tickets
"""
Exports Issues from a specified repository to a CSV file and creates corresponding tickets in JIRA.
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
Use the following gist as config for this script: https://gist.github.com/atharvai/16996fbb73442f8a1cfb5bffb11c412e
"""
import csv
import requests
#!/usr/bin/python
from jira.client import JIRA
import argparse
import jira.client
parser = argparse.ArgumentParser(description='Automation Jira cards')
parser.add_argument('--key', help='add jira API key')
parser.add_argument('--email', help='Your Jira email')
parser.add_argument('--server', help='Your server URL', required=True)
@awsvpc
awsvpc / create_issue_with_attachment.py
Created July 4, 2024 01:20 — forked from kittoh/create_issue_with_attachment.py
Creates Issue for JIRA which includes an attachment file
from jira import JIRA
import click
ISSUE_SUMMARY = "TEST SUMMARY from kittoh"
ISSUE_DESCRIPTION = """TEST
1.
2.
3.
"""
@awsvpc
awsvpc / jira_release.py
Created July 4, 2024 01:19 — forked from rgpower/jira_release.py
You can use this tool to generate the list of repos, branches, and commits associated with a given Jira Project Release.
#! /usr/bin/env python3
import sys
import argparse
import json
import netrc
import textwrap
import urllib.parse
import urllib.request
import urllib.error
@awsvpc
awsvpc / script_jira.py
Created July 4, 2024 01:16 — forked from parjun8840/script_jira.py
jira ticket create
% cat scripts/script_jira.py
--------------------------------
import os
from jira import JIRA
def create_ticket():
try:
jira_connection = JIRA(basic_auth=(os.environ['JIRA_EMAIL'], os.environ['JIRA_TOKEN']), server=os.environ['JIRA_SERVER_URL'])
issue_dict = {
'project': {'key': os.environ['JIRA_ORG_ID']},
def add_to_current_spring(self):
res = self.jira.sprints(437)
#print(dir(res[0]))
#print(res[0].state)
for sprint in res:
if sprint.state == "ACTIVE":
print(isinstance(sprint.id,int))
print(self.new_issue.key)
res = self.jira.add_issues_to_sprint(sprint_id=sprint.id,issue_keys=[self.new_issue.key])
print(res)
@awsvpc
awsvpc / Rename.ps1
Created May 23, 2024 13:50 — forked from timnew/Rename.ps1
Script to Rename Computer without Reboot
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName
#!/usr/bin/env sh
set -ex
command_exists() {
command -v "$@" > /dev/null 2>&1
}
user="$(id -un 2>/dev/null || true)"
param (
[Parameter(Mandatory=$true)][string]$zip,
[string]$dir = "$HOME\Python"
)
if (Test-Path $dir) {
Remove-Item $dir
}
New-Item -Path $dir -ItemType Directory -Force