Skip to content

Conversation

@jessking28
Copy link

What this PR does / why we need it:

  • Adds a slash command to test the jira authentication being used
  • Adds a slash command to summarize project velocity metrics in jira for the last 120 days

Special notes for your reviewer:

Checklist:

  • [x ] Subject and description added to both, commit and PR.
  • [ x] Relevant issues have been referenced.
  • [x ] This change includes docs.

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jessking28
Once this PR has been reviewed and has the lgtm label, please assign theobarberbany for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@stbenjam stbenjam left a comment

Choose a reason for hiding this comment

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

Lots of neat ideas in here


To fix authentication:
1. Verify JIRA credentials are correct
2. Generate new API token: https://id.atlassian.com/manage-profile/security/api-tokens
Copy link
Member

Choose a reason for hiding this comment

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

This isn't required for issues.redhat.com, until we move to jira cloud. I've got a PR up to fix that in the jira readme

Comment on lines +41 to +42
2. **Test Authentication Credentials**
- If MCP server is available, attempt authenticated operation
Copy link
Member

Choose a reason for hiding this comment

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

How would it know? I'd be a little worried it might try to do some kind of write action here. A lot of reads to our jira instance don't require auth for public cards

Copy link
Member

Choose a reason for hiding this comment

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

Maybe you could create a dummy private OCPBUGS card and try to read it here (e.g. "See if you can read the jira issue OCPBUGS-99999")

Comment on lines +46 to +47
- 🔐 Authenticated mode (MCP) - Full access to private projects
- 🌐 Public API mode - Limited to public issues only
Copy link
Member

Choose a reason for hiding this comment

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

How does it know? I'm not sure test-auth could reliably determine it

Comment on lines +49 to +53
**Force Public Mode:**
Use `--force-public` flag to bypass MCP and use public API directly:
- Example: `/jira:project-velocity OCPBUGS --force-public`
- Useful for: Quick queries on public projects
- Limitation: Only works for public projects
Copy link
Member

Choose a reason for hiding this comment

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

This is an nice idea

I bet you could make this work generally for all the read-only jira commands, by creating a SKILL that tells it something like

"Use this skill when you don't have a jira MCP server available but need to perform some Jira action"

And then give it some curl API examples equivalent to MCP calls in the skill. You also don't need any special --force-public flag.

Copy link
Author

Choose a reason for hiding this comment

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

So the test-auth came about because I wasn't getting anything when I tried running this on my own jira project because it's not public and the data we're hoping to produce with the project-velocity command should include the internal issues as well. It's not super helpful for us to only look at the public ones. I saw that the code already supported setting up authentication credentials in the mcp server or at least it appeared that way when it gave me instructions on how to configure it. So just adding the ability to test that the set up worked was the main goal of that. The reason I added the force option is incase someone wanted to know the public counts they could but it was mainly to force the user to actually set up authentication to read the internal issues. This is all very new to me so I have no idea if I went about it the right way and am definitely open to changing things but just wanted to provide some context.

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.

2 participants