Skip to content

Tim-Cao/work-with-script

Repository files navigation

Work with Script

Requirements

  1. Python 3.9 or above

  2. python3-pip

Installation

  1. Clone this repository to a local directory

     [email protected]:Tim-Cao/work-with-script.git
    

Configuration

  1. Run the following command at the root directory of local repository, it will generate a credentials-ext.properties

     python3 initialization.py
    
  2. Generate jira API Token

    1. Sign in https://liferay.atlassian.net/

    2. Click the cog icon > Atlassian account settings > Security > Create and manage API tokens

    3. Create API Token

    4. Save generated token in your local file as you will not be able to see this again.

  3. Generate github API Token

    1. Sign in https://github.com/

    2. Personal Menu > Settings > Developer Settings > Personal access tokens > Tokens(classic) > Generate new token

    3. Add a name > Leave expiration as default > Select the following scopes

      image

      image

    4. Generate token

    5. Save generated token in your local file as you will not be able to see this again.

  4. Please fill out the value of properties in the credentials-ext.properties

    1. For required properties of each feature, please see Features section

Upgrade dependencies

  1. Run the following command at the root directory of local repository

     python3 upgrade.py
    

Launch the app

  1. Run the following command at the root directory of local repository

     python3 script_app.py
    

Open the credentials-ext.properties

  1. Execute ctrl + o shortcuts in app

    1. This file will open with vscode automatically.

    2. If you don't install vscode. Please open it manually.

Sync the Jira project components

  1. Execute ctrl + s shortcuts in app

See more shortcuts

  1. Execute ctrl + b shortcuts in app

    1. All shortcuts details will appear on a sidebar.

Features

  1. Create a pull request and forward

    create_pr_and_forward

    See pull request styles

    Required properties: GITHUB_REVIEWER_NAME, GITHUB_USER_NAME, GITHUB_TOKEN, LOCAL_REPO_PATH, TEAM_REPO_NAME

  2. Forward a failure pull request to BrianChan

    forward_failure_pull_request

    See pull request styles

    Required properties: GITHUB_USER_NAME, GITHUB_TOKEN, LOCAL_REPO_PATH, TEAM_REPO_NAME

  3. Create a test fix ticket based on a given case result

    create_test_fix_ticket

    Required properties: JIRA_USER_NAME, JIRA_TOKEN, TESTRAY_USER_NAME, TESTRAY_PASSWORD

  4. Write a comments template to a given jira ticket

    write_comments

    See comments styles

    Required properties: JIRA_USER_NAME, JIRA_TOKEN

  5. Write a description template to a given jira ticket

    write_description

    See description styles

    Required properties: JIRA_USER_NAME, JIRA_TOKEN

  6. Trigger gauntlet test suite on ci

    Trigger_Gauntlet

    Required properties: JIRA_USER_NAME, JIRA_TOKEN, LEGACY_REPO_PATH, GITHUB_USER_NAME, GITHUB_TOKEN

  7. Create a Jira issue

    create_issue

    Required properties: JIRA_USER_NAME, JIRA_TOKEN

  8. Run RCA

    rca

    Required properties: JIRA_USER_NAME, JIRA_TOKEN, GITHUB_USER_NAME, GITHUB_TOKEN