Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

Figure out co-authors of each migrated collection from Git #497

Closed
wants to merge 1 commit into from

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Mar 6, 2020

This patch effectively extracts all authors and co-authors of files scheduled for removal per collection and adds them as Co-Authored-By: Name <email> to the migrated collection initial commits. This implementation has some performance penalty, see the CI.

@webknjaz webknjaz added the enhancement New feature or request label Mar 6, 2020
@webknjaz webknjaz requested review from bcoca and gundalow March 6, 2020 19:04
@boring-cyborg boring-cyborg bot added the migrate The migration script and its deps label Mar 6, 2020
@webknjaz webknjaz requested a review from jctanner March 6, 2020 19:08
return bool(author_entry) and not author_entry.endswith(forbidden_emails)


def find_all_the_authors(files, repo_path):
Copy link
Member Author

Choose a reason for hiding this comment

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

(this is kept for history, it's not actually called)

commit_msg = '\n\n'.join(
(
'Initial commit',
'See also: https://github.com/ansible-collections/overview',
Copy link
Member Author

Choose a reason for hiding this comment

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

@gundalow is this ref correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's a good URL, thanks.

@webknjaz
Copy link
Member Author

webknjaz commented Mar 6, 2020

@gundalow @jctanner @bcoca here's a collection from NWO that I published from a local run: coll-test/azure.azcollection@2e996dc. GitHub recognizes 87 co-authors in the commit!

@gundalow
Copy link
Contributor

gundalow commented Mar 6, 2020

@webknjaz That's amazing work.

@webknjaz
Copy link
Member Author

webknjaz commented Mar 6, 2020

The downside is that it makes the script considerably slower. Which is fine for a one-time run but still is annoying. So I don't know if @bcoca will accept it...

@gundalow
Copy link
Contributor

gundalow commented Mar 6, 2020

I guess that's OK as long as this is one of the last PRs to be merged?

@webknjaz
Copy link
Member Author

webknjaz commented Mar 7, 2020

@gundalow I think so. Looks like it adds ~30 min in CI but is faster for me locally.

@gundalow
Copy link
Contributor

Migration is done, closing all open PRs and issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker enhancement New feature or request migrate The migration script and its deps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants