quarkusio / quarkus-github-lottery

A Quarkus-powered application that regularly sends short lists of GitHub issues for triagers/maintainers to consider
Apache License 2.0
6 stars 3 forks source link
github quarkus

= Quarkus GitHub Lottery

A Quarkus-powered GitHub App that regularly sends short lists of GitHub issues for triagers/maintainers/stewards to consider.

[[intro]] == Introduction

This GitHub App is based on the https://github.com/quarkiverse/quarkus-github-app[Quarkus GitHub App framework].

It periodically extracts GitHub issues from one "source" GitHub repository (e.g. https://github.com/quarkusio/quarkus) and notifies maintainers about them by commenting on GitHub issues in another "notification" GitHub repository (e.g. https://github.com/quarkusio/quarkus-github-lottery-reports). That second "notification" repository <<admins-install,may be private>>, as it's only about notifying maintainers.

Each maintainer who participates in the lottery (opt-in) gets their own dedicated GitHub issue in the "reports" repository, on which the application will add one comment mentioning the maintainer each time its sends a notification. That way, maintainers will get daily (or weekly) reports via email, sent by GitHub when the comment is added.

Issues are randomly assigned among eligible maintainers up to a limit they define themselves, so that everyone gets a chance to help according to the time they want to invest.

There are multiple categories of issues that one can be notified about; see <> for more information, but here's what an email notification may look like:

image::documentation/screenshots/notification.png[Example of an email notification,align="center"]

[[maintainers]] == Triagers/Maintainers/Stewards: how to get notifications

[[participants-basics]] === Basics

As a Quarkus triager, a Quarkus core/extension maintainer, or a Quarkus steward, in order to get notifications about Quarkus issues on GitHub:

Here is what an entry will look like:

[source,yaml]

[...]

participants:

username:: Your GitHub username. + String, mandatory, no default. timezone:: Your timezone, to get notifications at the right time on the right day. + java.time.ZoneId as a String, optional, defaults to UTC. triage:: Optional section for triagers. + See <> for details. maintenance:: Optional section for maintainers. + See <> for details. stewardship:: Optional section for stewards. + See <> for details.

The triage, maintenance and stewardship sections are all optional; you may participate in triage but not maintain an area of Quarkus nor do any stewardship, and vice-versa, or do everything. See below for details about each section.

[[participants-triage]] === Triage

If the triage section is present, you will get notified when new issues are created and need to be routed to the right person/team.

Addressing these notifications generally involves removing the triage/needs-triage label, adding the correct +area/*+ labels, and optionally pinging the relevant maintainers (though the https://github.com/quarkusio/quarkus-github-bot#triage-issues[Quarkus GitHub Bot should generally take care of that part] once you add +area/*+ labels).

Of course, some more discussion might be necessary before that, and that's fine: issues that don't change will reappear in another notification, a few days later.

The triage section will look like this:

[source,yaml]

[...]

participants:

days:: On which days you wish to get notified about triage. + Array of WeekDays, mandatory, no default. maxIssues:: How many issues, at most, you wish to be included in the "triage" category for each notification. + Integer, mandatory, no default.

[[participants-maintenance]] === Maintenance

If the maintenance section is present, you will get notified about issues related to a specific area (e.g. area/hibernate-orm) that may be stalled and require intervention from maintainers or reporters.

Issues in "maintenance" notifications will be split in three categories:

Feedback Needed:: These issues have the triage/needs-reproducer label, and it looks like the Quarkus team was the last to comment on the issue, quite some time ago. + Depending on the actual content of the issue, you might want to: +

Of course, in every situation, simply continuing the conversation, pinging someone, or even doing nothing at all are perfectly acceptable responses: it's all up to you, and issues that don't change will reappear in another notification, a few days later.

The maintenance section will look like this:

[source,yaml]

[...]

participants:

labels:: The labels identifying issues you are interested in, as a maintainer. Issues mentioned in notifications will have at least one of those labels. + Array of Strings, mandatory, no default. days:: On which days you wish to get notified about maintenance. + Array of WeekDays, mandatory, no default. feedback.needed.maxIssues:: How many issues, at most, you wish to be included in the "Feedback needed" category for each notification. + Integer, mandatory, no default. feedback.provided.maxIssues:: How many issues, at most, you wish to be included in the "Feedback provided" category for each notification. + Integer, mandatory, no default. stale.maxIssues:: How many issues, at most, you wish to be included in the "Stale" category for each notification. + Integer, mandatory, no default.

[[participants-stewardship]] === Stewardship

IMPORTANT: This section should only be of interest to stewards: core contributors who spend significant time working on GitHub issues. If you don't already know what this section is about, you probably don't want to use it.

If the stewardship section is present, you will get notified about issues that just became stale, across the whole project, without any consideration for the labels assigned to those issues.

Depending on the actual content of the issue, you might want to simply continue the conversation, ping someone, close the issue, or even do nothing at all: it's all up to you, and issues that don't change will reappear in another notification, a few days later.

NOTE: Notifications to stewards are sent independently of notifications to maintainers, so that the work of maintainers won't be affected by the work of stewards. It is entirely possible for a maintainer to be notified about an issue at the same time as a steward.

The stewardship section will look like this:

[source,yaml]

[...]

participants:

days:: On which days you wish to get notified about stewardship. + Array of WeekDays, mandatory, no default. maxIssues:: How many issues, at most, you wish to be included in the "stewardship" category for each notification. + Integer, mandatory, no default.

[[participants-suspending]] === Suspending notifications

You can suspend notifications (temporarily or forever) simply by closing the dedicated GitHub issue created for you in the "notification" repository.

See the footnote in the notifications you receive.

[[admins]] == Admins: how to install and initialize configuration

[[admins-install]] === Installing

Here is a link to the application on GitHub: https://github.com/apps/quarkus-github-lottery

The application needs to be installed on both the "source" repository (the one issues are extracted from) and the "notification" repository (the one "notification" issues are added to).

IMPORTANT: For security reasons, the two GitHub repositories need to be in the same organization (technically, the same "installation"). Failing that, lottery draws will error out and will not send any notification.

[TIP]

The "notification" repository should ideally be private:

[[admins-config]] === Configuring

The configuration file https://github.com/quarkusio/quarkus/blob/main/.github/quarkus-github-lottery.yml[`.github/quarkus-github-lottery.yml`] includes several sections that are common to all participants to the lottery:

[source,yaml]

notifications: createIssues: repository: "quarkusio/quarkus-github-lottery-reports" buckets: triage: label: "triage/needs-triage" delay: PT0S timeout: P3D maintenance: feedback: label: "triage/needs-reproducer" needed: delay: P21D timeout: P3D provided: delay: P7D timeout: P3D stale: delay: P60D timeout: P14D stewardship: delay: P60D timeout: P14D

[...]


notifications.createIssues.repository:: The full name of the GitHub repository where "reports"/"notification issues" will be created. + String, mandatory, no default. buckets.triage.label:: The label identifying GitHub issues that require triage. + String, mandatory, no default. buckets.triage.delay:: How much time to wait after the last update on an issue before including it in the lottery in the "triage" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.triage.timeout:: How much time to wait after an issue was last notified about before including it again in the lottery in the "triage" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.feedback.label:: The label identifying GitHub issues for which feedback (a reproducer, more information, ...) was requested. + String, mandatory, no default. buckets.maintenance.feedback.needed.delay:: How much time to wait after the last update on an issue before including it in the lottery in the "feedback needed" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.feedback.needed.timeout:: How much time to wait after an issue was last notified about before including it again in the lottery in the "feedback needed" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.feedback.provided.delay:: How much time to wait after the last update on an issue before including it in the lottery in the "feedback provided" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.feedback.provided.timeout:: How much time to wait after an issue was last notified about before including it again in the lottery in the "feedback provided" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.stale.delay:: How much time to wait after the last update on an issue before including it in the lottery in the "stale" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.maintenance.stale.timeout:: How much time to wait after an issue was last notified about before including it again in the lottery in the "stale" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.stewardship.delay:: How much time to wait after the last update on an issue before including it in the lottery in the "stewardship" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default. buckets.stewardship.timeout:: How much time to wait after an issue was last notified about before including it again in the lottery in the "stewardship" bucket. + String in https://en.wikipedia.org/wiki/ISO_8601#Durations[ISO-8601 duration format], mandatory, no default.

[[config-validation]] === Validation of the configuration

The application will automatically add a check to any pull request that changes its <<config,configuration file>>.

The check is fairly simple, it just attempts to deserialize the YAML file and reports any exception.

[[commands]] === Comment-based commands

https://quarkiverse.github.io/quarkiverse-docs/quarkus-github-app/dev/commands.html[Comment-based commands] are available for admins. You can invoke it by adding a comment on any issue or pull request for repositories where the app is installed.

It supports the following commands:

[[contributing]] == Contributing

To participate in the development of this GitHub App, create a playground project in your own org and follow the steps outlined in https://quarkiverse.github.io/quarkiverse-docs/quarkus-github-app/dev/index.html[the Quarkus GitHub App documentation].

When registering your app, request the following Repository permissions:

And subscribe to the following events:

[[deployment]] == Deployment

Maintainers can review the application and update configuration/secrets on the OpenShift console.

There is only one namespace at the moment:

Deployment will happen automatically when pushing to the relevant branch.

Be careful about which configuration you change in the UI, as deployment may overwrite part of the topology.

[[license]] == License

This project is licensed under the Apache License Version 2.0.