Skip to content

Added issue_tracker config#354

Merged
fao89 merged 1 commit intopulp:masterfrom
gerrod3:github_issues
Apr 7, 2021
Merged

Added issue_tracker config#354
fao89 merged 1 commit intopulp:masterfrom
gerrod3:github_issues

Conversation

@gerrod3
Copy link
Copy Markdown
Contributor

@gerrod3 gerrod3 commented Mar 11, 2021

[noissue]

Adding new config option, plus a --migrate-github-issues command to help plugins move off of Redmine in the future. This PR follows the instructions @daviddavis came up with here: https://hackmd.io/y3AnY_bCQCODemWQk2bfoQ?both. I'm going to test this out soon on Pulp Python after its next release.

@pulpbot
Copy link
Copy Markdown
Member

pulpbot commented Mar 11, 2021

WARNING!!! This PR is not attached to an issue. In most cases this is not advisable. Please see our PR docs for more information about how to attach this PR to an issue.

{% if issue_tracker=='redmine' %}
issue_format = "`#{issue} <https://pulp.plan.io/issues/{issue}>`_"
{% else %}
issue_format = "`#{issue} <https://github.com/pulp/{{ plugin_name }}/issues/{issue}>`_"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add support for different orgs here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think so

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this might require a separate PR. There are other templates where we have Github links with the Pulp org.

Visit [our tracker](https://pulp.plan.io/projects/{{ redmine_project }}/issues/new) to file a {{ plugin_dash }} issue.
{% else %}
File through this project's GitHub issues and appropriate labels.
{% endif %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we should allow not to specify any issue tracker too.

Comment thread plugin-template Outdated
{% if issue_tracker=='redmine' %}
issue_format = "`#{issue} <https://pulp.plan.io/issues/{issue}>`_"
{% else %}
issue_format = "`#{issue} <https://github.com/pulp/{{ plugin_name }}/issues/{issue}>`_"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think so

Comment thread plugin-template Outdated
Comment on lines +337 to +342
print(f"\nDon't forget to migrate current issues from https://pulp.plan.io/projects/{redmine}"
f" and remove the repo from the project settings")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we have some script for it?
If so, can we link it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the script I found https://github.com/IQSS/redmine2github that I was talking about in our previous meeting. I haven't tested it, but would you still like me to add a link to it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sorry, I forgot to reply, if it is not tested, it is better not to adding it

@gerrod3 gerrod3 force-pushed the github_issues branch 3 times, most recently from e74783d to 72bdc90 Compare March 25, 2021 20:28
@gerrod3 gerrod3 requested a review from mdellweg March 26, 2021 13:49
Copy link
Copy Markdown
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

So should we merge this before or after it has been tested with pulp_ansible?

Comment thread plugin-template Outdated
config['update_redmine'] = False
write_template_section(config, "generate_config", plugin_root_dir, verbose=verbose)
write_template_section(config, "github", plugin_root_dir, verbose=verbose)
print("\nUpdating pyproject.toml to point to GitHub issues")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why should a print statement start with a newline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was done earlier in the script. I changed it to after.

Comment thread plugin-template Outdated

def migrate_github_issues(config, plugin_root_dir, verbose=False):
"""Moves the plugin's issue checker CI/CD off of Redmine and onto GitHub"""
config['issue_tracker'] = 'github'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
config['issue_tracker'] = 'github'
print("Updating template_config.yml and and templating ci section")
config['issue_tracker'] = 'github'

@gerrod3 gerrod3 force-pushed the github_issues branch 2 times, most recently from 832c681 to d075e96 Compare March 29, 2021 20:22
@gerrod3
Copy link
Copy Markdown
Contributor Author

gerrod3 commented Mar 29, 2021

So should we merge this before or after it has been tested with pulp_ansible?

I already testing this with pulp_python pulp/pulp_python#355

Copy link
Copy Markdown
Member

@fao89 fao89 left a comment

Choose a reason for hiding this comment

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

LGTM!

@fao89 fao89 merged commit ec9c6aa into pulp:master Apr 7, 2021
@gerrod3 gerrod3 deleted the github_issues branch April 7, 2021 17:58
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.

4 participants