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

Update helper.py to fix #8785 #8786

Merged
merged 3 commits into from Dec 12, 2023
Merged

Update helper.py to fix #8785 #8786

merged 3 commits into from Dec 12, 2023

Conversation

devsecopsale
Copy link
Contributor

this will fix #8785

⚠️ Note on feature completeness ⚠️

We are narrowing the scope of acceptable enhancements to DefectDojo in preparation for v3. Learn more here:
https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md

Description

this will fix #8785 , by adding the jira.project default_assignee (when defined) to the issue creation api call instead of adding a second step to do it.

Test results

this was tested in 2.23.2 and allowed to create issues in a Jira project where no 'unassigned' or 'automatic' assignee was allowed.

Documentation

Checklist

This checklist is for your information.

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is flake8 compliant.
  • Your code is python 3.11 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

Extra information

Please clear everything below when submitting your pull request, it's here purely for your information.

Moderators: Labels currently accepted for PRs:

  • Import Scans (for new scanners/importers)
  • enhancement
  • performance
  • feature
  • bugfix
  • maintenance (a.k.a chores)
  • dependencies
  • New Migration (when the PR introduces a DB migration)
  • settings_changes (when the PR introduces changes or new settings in settings.dist.py)

Contributors: Git Tips

Rebase on dev branch

If the dev branch has changed since you started working on it, please rebase your work after the current dev.

On your working branch mybranch:

git rebase dev mybranch

In case of conflict:

 git mergetool
 git rebase --continue

When everything's fine on your local branch, force push to your myOrigin remote:

git push myOrigin --force-with-lease

To cancel everything:

git rebase --abort

Squashing commits

git rebase -i origin/dev
  • Replace pick by fixup on the commits you want squashed out
  • Replace pick by reword on the first commit if you want to change the commit message
  • Save the file and quit your editor

Force push to your myOrigin remote:

git push myOrigin --force-with-lease

dojo/jira_link/helper.py Outdated Show resolved Hide resolved
added extra check to verify if assignee was actually set correctly after ticket creation
@Maffooch
Copy link
Contributor

Flake8 is very unhappy :/ please take a look

@devsecopsale
Copy link
Contributor Author

Flake8 is very unhappy :/ please take a look

For what I could see, none of the warnings come from the changes I made.

@devsecopsale
Copy link
Contributor Author

Flake8 is very unhappy :/ please take a look

For what I could see, none of the warnings come from the changes I made.

hi @Maffooch , just checking if you had the chance to read my last response. thanks

@Maffooch
Copy link
Contributor

Maffooch commented Nov 6, 2023

Hi @devsecopsale apologies, I missed your response. It does look like none of the errors flake8 are reporting are a result of changes you made. Unfortunately, I am unable to merge the PR until all checks are passing

replaced '==' by 'is' when comparing types
Copy link
Contributor

github-actions bot commented Nov 7, 2023

python: can't open file '/home/runner/work/django-DefectDojo/django-DefectDojo/.github/scripts/git_protect.py': [Errno 2] No such file or directory

@devsecopsale
Copy link
Contributor Author

Hi @Maffooch , I fixed flake8 errors too. There's now an error reported by git_protect.py. Not a clue why this is failing.

Run python .github/scripts/git_protect.py 1c8e375 86e5d68 --comment-only &> output.txt
Error: Process completed with exit code 2.

@devsecopsale
Copy link
Contributor Author

hi @Maffooch , any idea of what this check is about? can this be rerun?

@mtesauro
Copy link
Contributor

@devsecopsale About that test - see here: #8974

It allows us to signal contributors that they are touching files that we may be actively working on updating/doing a re-write. I don't have time right now to review this PR but that test isn't something you can "pass" short of removing the file(s) from the PR which probably isn't possible for this one.

Think of this as a heads-up that we're going to look a bit more closely at this PR vs a parser PR for example.

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@devsecopsale
Copy link
Contributor Author

@dougmorato , @Juu: I just need 2 more approvals to merge. Thank you

@mtesauro mtesauro merged commit 5c4446d into DefectDojo:dev Dec 12, 2023
117 of 118 checks passed
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.

None yet

5 participants