RFR: 1547: Collect PR specific constants in single shared class

Erik Joelsson erikj at openjdk.org
Fri Jan 27 15:18:17 UTC 2023


On Thu, 26 Jan 2023 22:59:07 GMT, Zhao Song <zsong at openjdk.org> wrote:

> There are numerous string literals and constants duplicated and spread around different bots. This includes markers (used in PR body and comments) for various bot functionality as well as label names.
> 
> In this patch,  I cleaned the constants in different bots according to this standard:
> 
> 1. If a constant is used by multiple bots, it should be placed in bots.common.PullRequestConstants.
> 2. If a constant is used by different classes within a single bot, it should be placed in a single class within the bot, and other classes should import the constant.
> 3. If a constant is only used by one class within a single bot, it should be made private to that class.
> 
> Also, I have renamed the constants that were previously named in an inconsistent manner.

Looks great, thanks for fixing this!

-------------

Marked as reviewed by erikj (Lead).

PR: https://git.openjdk.org/skara/pull/1464


More information about the skara-dev mailing list