From b7384588bbf7701c0c28f86d159a24dbb90dc111 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Tue, 7 May 2024 22:53:54 -0400 Subject: [PATCH] :ghost: Remove jira sync issues.yml workflow (#1897) The `issues.yml` workflow looked to be configured to updated issues in a jira instance with changes to github issues when the github issue is prefixed `[TACKLE2-*]`. Since that project no longer exists in the jira instance and the action has not run in >1 year, removing it makes sense. Signed-off-by: Scott J Dickerson Co-authored-by: Ian Bolton --- .github/scripts/issue_create.sh | 11 ------ .github/scripts/issue_transaction.sh | 8 ---- .github/workflows/issues.yml | 55 ---------------------------- 3 files changed, 74 deletions(-) delete mode 100755 .github/scripts/issue_create.sh delete mode 100755 .github/scripts/issue_transaction.sh delete mode 100644 .github/workflows/issues.yml diff --git a/.github/scripts/issue_create.sh b/.github/scripts/issue_create.sh deleted file mode 100755 index 2fb8612c76..0000000000 --- a/.github/scripts/issue_create.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo $GH_ISSUE_TITLE -echo $NUMBER -echo $DESCRIPTION -echo $REPOSITORY -JIRA_ISSUE_ID=$(echo $GH_ISSUE_TITLE|cut -d] -f1|sed 's/[[]//g') -TITLE=$(echo $GH_ISSUE_TITLE|cut -d] -f2) -echo $JIRA_ISSUE_ID -echo $TITLE -PAYLOAD="{ \"fields\": { \"project\": { \"key\": \"TACKLE\" }, \"parent\": { \"key\": \"$JIRA_ISSUE_ID\" }, \"summary\": \"[$REPOSITORY#"$NUMBER"]$TITLE\", \"description\": \"$DESCRIPTION\", \"issuetype\": { \"id\": 5 } } }" -echo $PAYLOAD -curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic "$BEARER -d "$PAYLOAD" https://issues.redhat.com/rest/api/2/issue/ diff --git a/.github/scripts/issue_transaction.sh b/.github/scripts/issue_transaction.sh deleted file mode 100755 index bb3b5d651f..0000000000 --- a/.github/scripts/issue_transaction.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo $GH_ISSUE_TITLE -echo $NUMBER -echo $REPOSITORY -JIRA_ISSUE_ID=$(echo $GH_ISSUE_TITLE|cut -d] -f1|sed 's/[[]//g') -echo $JIRA_ISSUE_ID -JIRA_SUBTASK_ID=$(curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic "$BEARER https://issues.redhat.com/rest/api/2/issue/$JIRA_ISSUE_ID|jq --raw-output '.fields.subtasks[] | select(.fields.summary | startswith("['$REPOSITORY'#'$NUMBER']")).key') -echo $JIRA_SUBTASK_ID -curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic "$BEARER https://issues.redhat.com/rest/api/2/issue/$JIRA_SUBTASK_ID/transitions -d "{\"transition\":{\"id\":$1}}" diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml deleted file mode 100644 index cf54664a57..0000000000 --- a/.github/workflows/issues.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Tackle UI Issues Sync - -defaults: - run: - shell: bash - working-directory: .github/scripts/ - -on: - issues: - types: [opened, closed, reopened] - -jobs: - - sync-opened: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'opened' && startsWith(github.event.issue.title, '[TACKLE2-') }} - name: New GitHub Issue to sync with Jira - steps: - - uses: actions/checkout@v2.3.4 - - env: - BEARER: ${{ secrets.JIRA_TACKLE_BEARER }} - GH_ISSUE_TITLE: ${{ github.event.issue.title }} - NUMBER: ${{ github.event.issue.number }} - DESCRIPTION: ${{ github.event.issue.html_url }} - REPOSITORY: ${{ github.event.repository.name }} - run: | - ./issue_create.sh - - sync-reopened: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'reopened' && startsWith(github.event.issue.title, '[TACKLE2-') }} - name: Reopened GitHub Issue to sync with Jira - steps: - - uses: actions/checkout@v2.3.4 - - env: - BEARER: ${{ secrets.JIRA_TACKLE_BEARER }} - GH_ISSUE_TITLE: ${{ github.event.issue.title }} - NUMBER: ${{ github.event.issue.number }} - REPOSITORY: ${{ github.event.repository.name }} - run: | - ./issue_transaction.sh 3 - - sync-closed: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'closed' && startsWith(github.event.issue.title, '[TACKLE2-') }} - name: Closed GitHub Issue to sync with Jira - steps: - - uses: actions/checkout@v2.3.4 - - env: - BEARER: ${{ secrets.JIRA_TACKLE_BEARER }} - GH_ISSUE_TITLE: ${{ github.event.issue.title }} - NUMBER: ${{ github.event.issue.number }} - REPOSITORY: ${{ github.event.repository.name }} - run: | - ./issue_transaction.sh 2