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

Mention non-org members on edits on migrated issues #429

Open
ezio-melotti opened this issue Apr 12, 2022 · 0 comments
Open

Mention non-org members on edits on migrated issues #429

ezio-melotti opened this issue Apr 12, 2022 · 0 comments
Assignees

Comments

@ezio-melotti
Copy link
Member

During the migration it was only possible to map subscriptions for members of the python org. This means that all other users (mapped to mannequins) are not subscribed to issues and are not receiving notifications. Luckily, in the first comment of each migrated issue, I included the GitHub names of all the nosy members that had their bpo account linked to GitHub.

The only way to resubscribe them is to mention them again. This can be done:

  • in an edit of the first message, possibly in the folded part;
  • in a new message (but it adds clutters and notifies everyone)

We verified that adding a mention in an edit triggers a notification for the mentioned person, and that mentioning an already mentioned personed doesn't trigger a second notification. It's not clear yet if people that are already subscribed will also receive a notification if they are mentioned in an edit, so we have two options:

  • mention again all the members of the nosy list (easier, but might trigger notifications for org-members that are already subscribed)
  • filter the nosy list and mention only the mannequins (more difficult, might require additional queries to GitHub)

Mentioning users also triggers an email, so it can not be done in bulk. We could however mention users lazily once when the first post-migration edit occurs. This should be done when a comment is added to the issue, when the issue is closed, and possibly for other events too.

I started implementing this as a GitHub action, but run into three issues:

  • Triggering the action on every issue edit generates a flood of actions in the Actions tab (also because PRs comments trigger the issue_comment event too)
  • I wanted to keep a list of updated issues where users have already been mentioned in order to avoid doing it again, and with an action I'm not sure where to put them (an alternative I considered is retrieving and inspecting the first message, but it's more computationally-intensive)
  • I'm not too familiar with GitHub actions and I find it easier implementing this with Python directly

So my current plan is to upgrade bedevere to:

  • subscribe to new issue comments and status changes and receive events through the existing webhook
  • when an event is received, check on a local file if the issue has already been updated (by mentioning nosy members)
  • if it isn't, retrieve the nosy list from the first message, possibly extract the mannequins, and mention them in an edit in the folded part of the first message
  • remove the updated issue from the list of migrated and not-yet-updated issues on the local file

While we are at it, this could also mention the PRs that were linked to the bpo issue -- this will add a notification that links back to the issue. We verified that issues and PRs can be linked in the sidebar only when the PR is set to close the issue, so it is not possible to add them there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant