Skip to content
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

Some JIRA Automation #473

Merged
merged 14 commits into from
Aug 30, 2023
Merged

Some JIRA Automation #473

merged 14 commits into from
Aug 30, 2023

Conversation

coverbeck
Copy link
Collaborator

@coverbeck coverbeck commented Aug 16, 2023

Description
This has been in a branch for several months now; I want to merge it so it's not lost even though some of it is in progress. I wouldn't submit a PR of this quality for the web service, but I think it's acceptable for support. But I can tidy up more if we think it's worth it.

This is some code to help with the JIRA admin tasks:

  • MilestoneChecker -- verifies that the synced GitHub issues and JIRA DOCK issues have the same fix version/milestone. It generates a JIRA url you can paste into your browser where the versions are out of sync. As background, the fix version in JIRA is a multi-value field; in GitHub it is a single value, which is why Unito doesn't sync.
  • ResolutionChecker -- helps find issues that are closed in JIRA but open in GitHub. We haven't needed to use it since we figured out the cause, that Unito was unaware either the GitHub or JIRA issue, and would close the JIRA issue as a result.
  • SprintStart -- A barely started, incomplete, app, to auto generate review tickets every sprint, which is currently a tedious manual process.

Review Instructions
Try running the MilestoneChecker. You'll probably need a GitHub token, although it may work once or twice without a GitHub token. You can just run it in the IDE:
Screen Shot 2023-08-24 at 5 25 49 PM

It should output a JIRA url in the console.

Issue
No issue was created.

Security
If there are any concerns that require extra attention from the security team, highlight them here.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that you pass the basic style checks and unit tests by running mvn clean install in the project that you have modified (until https://ucsc-cgl.atlassian.net/browse/SEAB-5300 adds multi-module support properly)
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • If you are changing dependencies, check with dependabot to ensure you are not introducing new high/critical vulnerabilities
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

@coverbeck coverbeck self-assigned this Aug 16, 2023
@coverbeck coverbeck force-pushed the feature/jira_automation branch from 371c3e3 to 3a72784 Compare August 16, 2023 19:39
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (7049bbd) 42.64% compared to head (383efca) 42.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #473   +/-   ##
==========================================
  Coverage      42.64%   42.64%           
  Complexity       172      172           
==========================================
  Files             24       24           
  Lines           1597     1597           
  Branches         131      131           
==========================================
  Hits             681      681           
  Misses           878      878           
  Partials          38       38           
Flag Coverage Δ
metricsaggregator 42.64% <ø> (ø)
toolbackup 32.31% <ø> (ø)
tooltester 32.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coverbeck coverbeck changed the title Detect mismatched Jira and GitHub milestones Some JIRA Automation Aug 25, 2023
Copy link
Member

@denis-yuen denis-yuen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

did a quick pass since this isn't for end-users

jira_automation/README.md Outdated Show resolved Hide resolved
Unito was seemingly mysteriously closing JIRA issues at random. It turned out to be because we hadn't properly configured
a GitHub and JIRA user in Unito -- it's the Unito intended behavior. We currently don't need to run this, although if we have
a configuration issue again, it could be useful in the future.
2. io.dockstore.jira.MilestoneChecker - generates GitHub and JQL queries to find mismatches in the JIRA fix version and GitHub milestone. The JIRA fix version is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. this is still a common problem

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. this is still a common problem

The Milestone thing is a common problem; I typically run it before a backlog grooming meeting and it will usually find a couple of issues out of sync.

Hopefully we won't need the ResolutionChecker again, since we figured out how the cause. But I wanted to keep it in case we onboard somebody incorrectly in the future and it crops up, and we need to go find the issues that were incorrectly closed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry, comment wasn't a question. Rather, I meant since this is a common problem, this should probably be re-ordered to be first)

<revision>1.0</revision>
<changelist>.0-SNAPSHOT</changelist>

<!--
Copy link
Member

@denis-yuen denis-yuen Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these seem unused (swagger, openapi annotations)

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@coverbeck coverbeck merged commit 63a74b3 into develop Aug 30, 2023
@coverbeck coverbeck deleted the feature/jira_automation branch August 30, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants