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

LIBAAEC-33 Modify PR template body and create github actions to add Jira issue #476

Open
wants to merge 17 commits into
base: qa
Choose a base branch
from

Conversation

Janell-Huyck
Copy link
Contributor

@Janell-Huyck Janell-Huyck commented Oct 16, 2024

Jira Issue: LIBAAEC-33

Jira Issue

Overview

This PR updates the PR template and adds in the Jira issue dynamically to the start of the PR and the PR's title. It relies on the Jira issue number being present at the start of the branch name, in this format: LIBAAEC-##-branch-description. For example, for this branch it is LIBAAEC-33-update-pr-template.

It uses Github actions to read the Jira issue number, and then dynamically adds that to the start of the PR title if not already present. It also dynamically adds a link to the Jira issue at the top of every PR.

How to easily add the Jira issue to the start of your branch name:

Jira has a built in dynamically generated branch name command. It is located here:
Screenshot 2024-10-16 at 10 03 22 AM

If you start your branch by copy/pasting the automatically generated text into your terminal, it will create a new branch for you with the issue at the start and a descriptive name based off the issue title.


How to Test the Jira Issue Link Automation

Create a New Pull Request:

  • Click the "New Pull Request" button in GitHub and select this branch: LIBAAEC-33-update-pr-template as the source branch.

  • Make sure your new branch name includes a valid Jira issue number in the format LIBAAEC-32-your-branch-description.

    • Optional testing: don't include a Jira issue in your branch name
  • In the PR description, you will initially see the placeholder: [Link will be automatically added here. Do not remove.]. Leave it there.

    • Optional testing: remove or modify the placeholder.
  • You do not have to add the issue number to the start of the PR name. A GitHub action will add that for you automatically after PR creation if you do not add it.

    • Optional testing: Add a valid or invalid Jira Issue number to the start.

Submit the PR:

  • Submit the pull request as you normally would.

  • After submitting, GitHub Actions will automatically update the PR description and title, replacing the placeholder with a link to the Jira issue based on the branch name and adding the Jira issue number to the start of the PR title.

Review the Results:

  • If your branch name did not have the Jira issue number, no changes should be present.

  • If you had a Jira issue number in your branch name:

    • Once the PR is updated, you should see the Jira issue link in place of the placeholder text.

      • If the placeholder was removed: You should still see a Jira link.
      • If the placeholder was modified: You should see your modified placeholder.
    • You should see one instance of the Jira issue name at the start of your PR's name.

      • If you put in any Jira issue, your issue # should remain unchanged and no further issue numbers present.

Additional note: a few minor changes were made to:

  • spec/features/publication_creation/other_college_field_manipulation_spec.rb because this was a flaky test. The changes are intended to prevent it from failing in the future due to DOM content not loading quickly enough.

@Janell-Huyck Janell-Huyck changed the title Modify PR template body and create github action to add Jira issue LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Oct 16, 2024
@github-actions github-actions bot changed the title LIBAAEC-33 Modify PR template body and create github actions to add Jira issue LIBAAEC-33 LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Oct 16, 2024
@github-actions github-actions bot changed the title LIBAAEC-33 LIBAAEC-33 Modify PR template body and create github actions to add Jira issue LIBAAEC-33 LIBAAEC-33 LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Oct 16, 2024
@Janell-Huyck Janell-Huyck changed the title LIBAAEC-33 LIBAAEC-33 LIBAAEC-33 Modify PR template body and create github actions to add Jira issue LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Oct 16, 2024
@hortongn hortongn self-requested a review October 18, 2024 13:34
@hortongn hortongn self-assigned this Oct 18, 2024
@hortongn
Copy link
Member

@Janell-Huyck I'd like to run through this with you next week. It's not working the way I would expect, but I might not understand how it should work.

@haitzlm
Copy link
Contributor

haitzlm commented Oct 18, 2024 via email

@Janell-Huyck Janell-Huyck changed the title LIBAAEC-33 Modify PR template body and create github actions to add Jira issue WIP LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Oct 24, 2024
@Janell-Huyck
Copy link
Contributor Author

Need to update to Rails 6.1.7.10 before we will be able to merge this PR

@Janell-Huyck Janell-Huyck changed the title WIP LIBAAEC-33 Modify PR template body and create github actions to add Jira issue LIBAAEC-33 Modify PR template body and create github actions to add Jira issue Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants