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

Preserve all trac ticket metadata in machine readable form #17

Closed
Tracked by #16
adiroiban opened this issue Nov 11, 2021 · 7 comments · Fixed by #23
Closed
Tracked by #16

Preserve all trac ticket metadata in machine readable form #17

adiroiban opened this issue Nov 11, 2021 · 7 comments · Fixed by #23
Assignees

Comments

@adiroiban
Copy link
Member

adiroiban commented Nov 11, 2021

We should make sure that all the ticket and comments metadata are kept inside the comments in an easy way to be parse by a machine.

We already migrate all the metadata ... and the original author is included in the comment.

but the author is in a human readable format

I like the current start line

trac-5648 ticket was created by @danuker at 2021-06-01 09:02:37Z.
Comment created by pqm at 2021-06-04 09:08:49Z.

But maybe we can also have something like this

trac-5648 ticket was created by @danuker at 2021-06-01 09:02:37Z.

TRAC TICKET DESCRIPTION HERE

---

trac-id: 1234
author: some-name
reporter: some-name
priority: some-value
milestone: some-value
branch: some-value

From here:

The following Trac ticket metadata should be converted into labels

  • status - closed | fixed | new | duplicate | re-open ... etc
  • type - defect | enhancement | task | release blocker
  • priority
  • component

Milestone should be assigned to GitHub Milestones

For all the other "free text" metadata we will only have the as machine readable text:

  • reporter
  • author
  • keywords
  • cc
  • branch

But we should also include status, type, priority...etc as machine readable.

@adiroiban
Copy link
Member Author

adiroiban commented Apr 7, 2022

and if possible try to make it easy to search the metadata it via github UI.

So maybe something like, to make the search input easier - https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+key%3Dvalue

key=value

This is why key2=value2 might be better.


Trying to avoid key1:value1 as it might overlap with GitHub metasearch keys.

But it looks like this works https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+key1%3Avalue1


Just make sure to not include spaces as the search will be a bit more complicated.
it still works, but you need double-quotes . Single quotes don't work.

https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+%22milestone%3A+some-value%22

@danuker
Copy link
Contributor

danuker commented Apr 8, 2022

This is why key2=value2 might be better.

Looks like GH considers = and : as word delimiters also, and the search does not filter out value1 as a word by itself. For example, these searches should find nothing:

https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+key2%3Avalue1
https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+key1%3Dvalue2

How about using double underscores? key3__value3 would be a single token (try searching for it, or switching the value with a nonexistent one).


Just make sure to not include spaces

Should I convert spaces in those values to underscores, to be treated as a single token by GitHub?

For example, the release management component would become release_management, or the totally automated release infrastructure milestone would become totally_automated_release_infrastructure.

@adiroiban
Copy link
Member Author

Instead of underscore ... maybe use '-' ...to reduce the stress on the shift key :)
..and, make it stand out from the key/valye delimiter key__space-value

key__space-value is ugly.
The only option is using double quotes is:issue "key3=value1" so I don't know which one is better.

@danuker
Copy link
Contributor

danuker commented Apr 8, 2022

Looks like quotes do not work for : or =, this ticket is still returned: https://github.com/chevah/trac-to-github/issues?q=is%3Aissue+is%3Aopen+%22key1%3Dvalue2%22

I will use the underscores as ugly as they are :(

For dashes, it looks like they also returns false positives: searching for some- followed by a word that is in this issue, but different than name or value still yields this result.

However the quotes work on the dashes, and you might not want to type an entire milestone like totally automated release infrastructure, so you could just search for milestone__totally.

@danuker
Copy link
Contributor

danuker commented Apr 8, 2022

Sadly quotes do not work on dashes either: https://github.com/chevah/trac-migration-staging/issues?q=is%3Aissue+is%3Aopen+%22value-unrelated%22

The word "unrelated" is far away from the word "value" in the ticket. But the result is still returned.

I now believe there should be a completely-underscored key__value_pair followed by a space and the original name:

milestone__Twisted_16_0 Twisted-16.0

Every non A-Za-z0-9 char should be changed to an underscore, for the version to be searchable. Otherwise if you search for "16.0" you will get hits for all tickets having 16 and 0, which might include version 16.3.1 with a 0 somewhere else in the ticket.

That way, people can search for the exact milestone match, and also see the original data so no meaning is lost.

This is what I will use pending feedback from Twisted contributors - feel free to point them to this ticket directly.

@danuker
Copy link
Contributor

danuker commented Apr 12, 2022

Example of CPython migrated ticket: python/cpython#38807

@danuker
Copy link
Contributor

danuker commented May 26, 2022

Data is preserved. Too much even (allowed every label).

@danuker danuker closed this as completed May 26, 2022
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 a pull request may close this issue.

2 participants