ietf-ribose / github-migration-project

Subversion to Git migration tooling
1 stars 0 forks source link

Placeholder GitHub Issues can be deleted (according to configuration) #20

Closed ronaldtse closed 2 years ago

ronaldtse commented 2 years ago

GitHub now provides an Issue "delete" button that we can use to remove the placeholder Issues we create for sequential numbering. (e.g. if the ticket was deleted from Trac prior to import).

(Since 2018-11-08: https://hub.packtpub.com/github-now-allows-repository-owners-to-delete-an-issue-curse-or-a-boon/)

By deleting the placeholder issues we prevent confusion by users who wonder why an issue was empty.

We should make this a default option to delete the placeholder issue once it is created.

This was my experiment on GitHub that worked.

  1. I created 3 issues
Screenshot 2021-12-03 at 10 46 09 PM
  1. Deleted 1
Screenshot 2021-12-03 at 10 46 24 PM
  1. Created a new issue, which got assigned as 4, which is correct.
Screenshot 2021-12-03 at 10 47 32 PM
  1. Deleted 3

  2. Created new issue, which is assigned 5, correct.

  3. See if I can still refer back to the deleted issues 1 and 3, which I couldn't, and that is correct.

Screenshot 2021-12-03 at 10 49 01 PM

So I don't think there would be any particular drawbacks.

Originally posted by @ronaldtse in https://github.com/ietf-ribose/github-migration-project/issues/2#issuecomment-985580933

HassanAkbar commented 2 years ago

@ronaldtse I didn’t find any endpoint in the Github REST API to delete the issues but there is an endpoint in Github GraphQL API but it also will only delete one issue at a time.

We can loop through all issues and use this API.

ronaldtse commented 2 years ago

@HassanAkbar thank you for the investigation. Let's use the GitHub GraphQL API to delete issues one at a time, there might be traffic limits that we need to account for.