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

Possibly create PRs instead of Issues for closed tickets with branches #57

Closed
mkoeppe opened this issue Dec 27, 2022 · 8 comments
Closed
Labels
wishlist item wontfix This will not be worked on

Comments

@mkoeppe
Copy link

mkoeppe commented Dec 27, 2022

Then we could use pull_request_events such as https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#head_ref_restored

@kwankyu
Copy link

kwankyu commented Jan 1, 2023

What do we need to use pull_request_event for?

We want all converted tickets be listed altogether in "Issues". Don't we? I think conceptually "ticket" is closer to "issue" than "PR". As Tobias pointed out, "issue" can be linked with a branch in sagetrac-mirror repo. Right?

@mkoeppe
Copy link
Author

mkoeppe commented Jan 1, 2023

What do we need to use pull_request_event for?

It would give us a way to show changes to the commit (from a push / force push) in the native GitHub format instead of using an issue comment.

We want all converted tickets be listed altogether in "Issues". Don't we? I think conceptually "ticket" is closer to "issue" than "PR".

Not necessarily. In the transition guide, "For contributing a change that does not address an existing open Issue", we direct developers to open a PR.

So also for the migration, tickets that start out with a (unique) branch could quite naturally be represented by a PR.

But it's probably not worth the extra work.

As Tobias pointed out, "issue" can be linked with a branch in sagetrac-mirror repo. Right?

I think this is a beta feature, and I don't think I have a way to do this in the migration archive.

@kwankyu
Copy link

kwankyu commented Jan 2, 2023

As Tobias pointed out, "issue" can be linked with a branch in sagetrac-mirror repo. Right?

I think this is a beta feature, and I don't think I have a way to do this in the migration archive.

As you mentioned before, there's "Create a branch, for this issue or link a pull request." button. So it seems there is an official concept of "issue linked with a branch". Moreover see https://github.blog/changelog/2022-09-07-link-existing-branches-to-an-issue/

It would be nice if this could be done by the migration script. It would be unfortunate if there's no API for this though..

What do we need to use pull_request_event for?

It would give us a way to show changes to the commit (from a push / force push) in the native GitHub format instead of using an issue comment.

Okay. But this is just one of the changes made to an issue(PR). I guess not all changes could be give in GitHub format anyway.

We want all converted tickets be listed altogether in "Issues". Don't we? I think conceptually "ticket" is closer to "issue" than "PR".

Not necessarily. In the transition guide, "For contributing a change that does not address an existing open Issue", we direct developers to open a PR.

So also for the migration, tickets that start out with a (unique) branch could quite naturally be represented by a PR.

But there' s subtle difference. Typical comments to a ticket (with a branch) are as follow

Comments before a branch -> a branch is attached -> Comments about the branch

but the comments to a PR are all about the branch. Hence it could be slightly confusing to read the comments of the ticket as comments to a PR.

But it's probably not worth the extra work.

I think it's better to make distinction between the issues converted from tickets and new issues (or new PRs) as we are making a new workflow.

As I understand it, by the new workflow, we will have three types of "work"

  • Issue linked with a PR (numbered separately)
  • PR without a corresponding issue
  • Issue with no PR

corresponding to a single ticket in trac.

@mkoeppe
Copy link
Author

mkoeppe commented Jan 2, 2023

As Tobias pointed out, "issue" can be linked with a branch in sagetrac-mirror repo. Right?

I think this is a beta feature, and I don't think I have a way to do this in the migration archive.

As you mentioned before, there's "Create a branch, for this issue or link a pull request." button. So it seems there is an official concept of "issue linked with a branch". Moreover see https://github.blog/changelog/2022-09-07-link-existing-branches-to-an-issue/

It would be nice if this could be done by the migration script. It would be unfortunate if there's no API for this though..

OK, I have created such an attached branch (test-attached-branch). I'll download a migration archive (#82) and check whether (and how) it is reflected in the archive. Documentation is very sparse unfortunately.

@mkoeppe
Copy link
Author

mkoeppe commented Jan 2, 2023

I think it's better to make distinction between the issues converted from tickets and new issues (or new PRs) as we are making a new workflow.

I agree.

As I understand it, by the new workflow, we will have three types of "work"

  • Issue linked with a PR (numbered separately)
  • PR without a corresponding issue
  • Issue with no PR

corresponding to a single ticket in trac.

Yes, that's right

@mkoeppe
Copy link
Author

mkoeppe commented Jan 2, 2023

I have created such an attached branch (test-attached-branch). I'll download a migration archive (#82) and check whether (and how) it is reflected in the archive.

This information does not show up in the migration archive.

@kwankyu
Copy link

kwankyu commented Jan 2, 2023

OK. Then it implies that there is no way to embed the attached branch information to the migration archive?

@mkoeppe
Copy link
Author

mkoeppe commented Jan 2, 2023

Yes, I think so.

@mkoeppe mkoeppe added the wontfix This will not be worked on label Jan 2, 2023
@mkoeppe mkoeppe closed this as completed Jan 2, 2023
@mkoeppe mkoeppe closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlist item wontfix This will not be worked on
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants