-
Notifications
You must be signed in to change notification settings - Fork 552
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
gh: Added workflows to sync GitHub with Jira #17500
Conversation
Adding a number of workflows to redpanda that will allow for some one-way syncing of GH Issues into Jira CORE. These workflows perform the following actions: - On GH issue creation, create a new Jira issue - If kind/bug is a label present on GH issue creation, the created JIRA issue will be a bug, otherwise its a task - Add all labels on the Github Issue at creation to the Jira issue - Add a link in the Jira issue back to the GH issue - At the bottom of the GH issue body, add a link back to the Jira Issue - On GH issue comment addition, add comment to linked Jira issue - When a GH issue closes, close the corresponding Jira issue - When a GH issue is reopened either: - Reopen the linked Jira issue, or if one doesn't exist, - Create a new Jira issue, and add all comments from the GH Issue to the Jira Issue Caveats: - Edits to issue body, comments, or comment deletions are not synced - If a GH PR is linked, that link is not carried over - Changes to labels are not synced - Changes in Jira issues are NOT synced with GH (not really a caveat more of a security 'feature') Signed-off-by: Michael Boquard <michael@redpanda.com>
Blocked until https://redpandadata.atlassian.net/browse/PLATENG-26 is completed |
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.
Looks good, I would certainly suggest creating a composite action for the repeated bits.
reopen_jira_issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
- name: install dependencies | ||
env: | ||
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts | ||
run: pip install -r ${SCRIPT_DIR}/requirements.txt | ||
- name: Reopen JIRA Task | ||
env: | ||
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts | ||
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} | ||
JIRA_USER: ${{ secrets.JIRA_USER }} | ||
ISSUE_URL: ${{ github.event.issue.html_url }} | ||
ISSUE_TITLE: ${{ github.event.issue.title }} | ||
ISSUE_BODY: ${{ github.event.issue.body }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_LABELS: ${{ join(github.event.issue.labels.*.name) }} | ||
run: python ${SCRIPT_DIR}/jira_helper.py REOPEN_ISSUE --verbose |
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.
Since all these workflows are the same thing but with slightly different environment variables and a different command, can we pull this out into a custom composite action?
Composite Actions: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
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.
Sounds like a nice imporvement... on the backlog :)
"project": { | ||
"key": f"{self._project_key}" | ||
}, | ||
"customfield_10052": f"{issue_url}" |
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.
customfield_10052
I know exactly what this means 😎
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.
External Github Issue Link
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.
Well yes I figured that out, was more complaining about the JIRA API 😄
This matches the current workflows found on the internal core repo
Adding a number of workflows to redpanda that will allow for some one-way syncing of GH Issues into Jira CORE.
These workflows perform the following actions:
Caveats:
Backports Required
Release Notes