github / rally

GitHub <> Rally integration
MIT License
123 stars 33 forks source link

Error: Not able to parse artifact type: undefined #199

Closed einanli closed 3 years ago

einanli commented 3 years ago

Describe the bug Using a lowercase Rally Story Id in the pull request body is resulting in an exception. "Error occurred while validating Rally Artifacts: Error: Not able to parse artifact type: undefined"

To Reproduce Steps to reproduce the behavior:

  1. Create a new PR
  2. in the body of the PR add a Rally story usxxxx (lower case us)
  3. check the Rally integration details
  4. see the error "Error occurred while validating Rally Artifacts: Error: Not able to parse artifact type: undefined"

Expected behavior If this is considered an invalid Rally Story id, we should get a validation failed result rather than an exception. The other option is making the check case insensitive.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context If you edit the PR body, and change the story id to upper case, this fixes the issue.

Here's my test config file:

---
# Name of the GitHub Check
checksName: integrations/rally

# Check PR Body for Rally story/defect (true | false)
checkPRBody: true

# Check PR Title for Rally story/defect (true | false)
checkPRTitle: false

# Check all commit messages for a Rally story/defect (true | false)
checkCommitMessages: false

# Set Rally Flow State to Complete on merge if the PR Body contains "/completes <DEFECT/STORY ID>"
mergeOnPRBody: true

# Comment on the PR in addition to the check message? (true | false)
commentOnPull: false

rally:
  server: https://rally1.rallydev.com
  workspace: xxxxxxxxxxx

  # Which projects this repo will link to.
  projects:
    - TEST Squad 1
    - TEST Squad 2

  # List of valid Rally objects to check
  objects:
    - defect
    - task
    - userstory
    - story

  # List of Rally states that an issue must be in in order to pass
  states:
    - Ready
    - Defined
    - In-Progress
github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

ineffyble commented 3 years ago

This should stay open.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.