-
Notifications
You must be signed in to change notification settings - Fork 10
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
OSOE-726: Migrate auto-resolve-done-jira-issue and create-jira-issues-for-community-activities to use API Key Manager for Jira #301
Conversation
This reverts commit fefb61b.
@coderabbitai review |
WalkthroughThe recent updates involve migrating GitHub actions from deprecated gajira actions to using the API Key Manager for Jira extension, enhancing Jira issue handling, and removing redundant steps. The changes streamline the process of updating Jira issues based on pull request statuses and creating new issues for community activities, utilizing PowerShell scripts for direct API interactions. Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChat with CodeRabbit Bot (
|
@coderabbitai review |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (13)
- .github/actions/auto-resolve-done-jira-issue/Update-JiraIssue.ps1 (1 hunks)
- .github/actions/auto-resolve-done-jira-issue/action.yml (2 hunks)
- .github/actions/create-jira-issues-for-community-activities/Add-JiraIssue.ps1 (1 hunks)
- .github/actions/create-jira-issues-for-community-activities/Initialize-IssueDetails.ps1 (3 hunks)
- .github/actions/create-jira-issues-for-community-activities/action.yml (3 hunks)
- .github/workflows/create-jira-issues-for-community-activities-in-this-repo.yml (1 hunks)
- .github/workflows/create-jira-issues-for-community-activities.yml (2 hunks)
- .github/workflows/post-pull-request-checks-automation.yml (2 hunks)
- .github/workflows/validate-pull-request.yml (1 hunks)
- .github/workflows/validate-submodule-pull-request.yml (1 hunks)
- .github/workflows/validate-this-pull-request.yml (1 hunks)
- Docs/Workflows/Productivity/CreateJiraIssuesForCommunityActivities.md (3 hunks)
- Docs/Workflows/Productivity/PostPullRequestChecksAutomation.md (2 hunks)
Files skipped from review due to trivial changes (2)
- .github/workflows/validate-submodule-pull-request.yml
- .github/workflows/validate-this-pull-request.yml
Additional comments: 24
.github/workflows/create-jira-issues-for-community-activities-in-this-repo.yml (1)
- 14-17: The update to reference the
issue/OSOE-726
branch is specific and should be verified to ensure that the branch exists and is intended for long-term use. The new secretsJIRA_ENDPOINT_URL
andJIRA_API_KEY
replace the previous ones, which is in line with the PR objectives to use the API Key Manager for Jira..github/workflows/validate-pull-request.yml (1)
- 5-11: The updated description for the
JIRA_BASE_URL
secret provides clearer instructions for its configuration, which is beneficial for maintainability and clarity for future users setting up the workflow..github/actions/auto-resolve-done-jira-issue/action.yml (1)
- 28-34: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [31-41]
The removal of the login logic and the direct use of the
Update-JiraIssue
function simplifies the action and aligns with the PR's goal to improve Jira integration. Ensure that theUpdate-JiraIssue
function is thoroughly tested to handle the transition correctly..github/actions/create-jira-issues-for-community-activities/Initialize-IssueDetails.ps1 (2)
8-8: The variable
$PullReqestJiraIssueDescription
has been corrected to$PullRequestJiraIssueDescription
. This is a good catch as it fixes a potential bug due to a typo.70-76: The output format has been changed to a
PSCustomObject
. This change should be verified to ensure that it matches the expected input format for any downstream processes that consume this output..github/actions/auto-resolve-done-jira-issue/Update-JiraIssue.ps1 (2)
1-22: The script now includes parameters for the repository, pull request number, and flags for determining the transition state. It's important to ensure that these parameters are properly sanitized and validated before use.
3-6: Using the GitHub CLI to fetch the latest PR title is a good approach to ensure the script operates on up-to-date information. However, it's important to handle potential errors from the CLI command gracefully.
Docs/Workflows/Productivity/PostPullRequestChecksAutomation.md (2)
8-16: The documentation now includes prerequisites for setting up JIRA secrets with the API Key Manager for Jira. This is a helpful addition for users who need to configure the workflow.
19-19: The setup section now directs users to the workflow's inline documentation for details on
MERGE_TOKEN
. This change helps to keep the documentation DRY by not repeating information..github/workflows/create-jira-issues-for-community-activities.yml (1)
- 7-16: The environment variable names have been updated to use the new JIRA secrets, which is in line with the PR objectives to use the API Key Manager for Jira. Ensure that these new secrets are properly set in the GitHub repository settings.
.github/actions/create-jira-issues-for-community-activities/Add-JiraIssue.ps1 (2)
1-16: The script now uses the
JIRA_API_KEY
environment variable and has a function to create Jira issues. It's important to ensure that the API key is handled securely and that the function correctly interfaces with the Jira API.71-92: The
AddLink
andGetIssueUrl
functions are important for integrating GitHub activities with Jira. Verify that these functions are implemented correctly and that they handle errors appropriately.Docs/Workflows/Productivity/CreateJiraIssuesForCommunityActivities.md (2)
5-16: The documentation now includes information on using the API Key Manager for Jira and detailed prerequisites for setting up JIRA secrets. This is a valuable update for users who need to configure the workflow.
34-34: The documentation correctly emphasizes the use of the
pull_request_target
trigger instead ofpull_request
. This is important for the workflow to function correctly with pull requests from forks..github/actions/create-jira-issues-for-community-activities/action.yml (7)
43-48: The step "Create Jira Issue" has been introduced, replacing multiple previous steps. Ensure that the logic encapsulated in the removed steps is now correctly handled within this single step.
46-48: The step id change from "issue-details" to "create-issue" is noted. Verify that this change is reflected wherever the step id is referenced.
50-50: Ensure that the environment variable
GITHUB_JSON
is used securely and that there is no risk of script injection, as the comment in the code suggests.58-67: The conversion of the GitHub context to a JSON object and then to a PowerShell object is a typical pattern. Confirm that the input is sanitized upstream to prevent injection attacks.
61-78: The hashtable setup for Jira issue creation parameters appears to be correct. Ensure that all necessary fields for creating a Jira issue are included and that the data types are appropriate, especially the conversion to boolean for
SuffixIssueTitles
.81-81: The
Add-JiraIssue
function is being used to create a Jira issue. Verify that this function exists and is implemented correctly to handle the parameters passed to it.91-92: The update to the GitHub issue uses output variables from the Jira issue creation step. Confirm that these outputs are correctly set by the
Add-JiraIssue
function and that the issue title and body are updated as intended..github/workflows/post-pull-request-checks-automation.yml (3)
20-29: The environment variables
JIRA_ENDPOINT_URL
andJIRA_API_KEY
have been introduced, replacing the previous Jira integration secrets. Ensure that these new variables are correctly used throughout the workflow and that the documentation has been updated accordingly.82-82: The GitHub action for JIRA issue resolution now references a specific issue branch (
issue/OSOE-726
). Confirm that this reference is intentional and aligns with the PR objectives to use more stable and issue-specific code references.85-86: The new JIRA environment variables
JIRA_ENDPOINT_URL
andJIRA_API_KEY
are being used. Verify that these are set up correctly in the repository secrets and that their usage here aligns with the intended security improvements.
We can't continue with this, see #277 (comment). |
OSOE-726
Fixes #130
Fixes #277
Summary by CodeRabbit
New Features
Improvements
Documentation
pull_request_target
trigger for improved workflow functionality.Refactor
Chores