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

Add stub script for compatibility-labelling PRs #22

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented Nov 29, 2023

This is a stub script that doesn't actually output true compatibility information (that information will be coming with scalacenter/sbt-version-policy#184 & subsequent PRs), it's just a demonstration showing what kind of behaviour would be desirable.

image

It's aiming to mock-up part 1 of the workflow described in scalacenter/sbt-version-policy#179, ie:

Keep devs aware of the compatibility of the PR they're working on : When a PR is opened on a library repository, an automated workflow comments-on or labels the PR, making them aware that "This PR breaks binary/source compatibility" - the information here would come from the sbt-version-policy plugin, but wouldn't require setting a versionPolicyIntention - it just establishes what the level of compatibility the PR entails, so that the developer is aware. The assumption here is that whatever the developer is doing, they need to do it, and should just know the compatibility cost the PR is going to have (and possibly, though not necessarily, once informed they may be able to modify the PR to improve the compatibility).

The script is written to add-and-remove labels as appropriate, if the required compatibility label (eg 'Breaks Binary Compatibility') wasn't already present, we assume this is new information and leave a detailed comment. In general, to reduce noise, we wouldn't necessarily want to add a new comment on every push, better to just tell the user how they can get this information by running locally...

@rtyley rtyley force-pushed the add-stub-workflow-script-for-compatibility-labelling branch 7 times, most recently from d46a8ad to fcd656d Compare November 29, 2023 15:54
Copy link

Mock info: This PR Breaks Binary Compatibility when compared against most recent release 3.0.0. Details...

This is a stub script that doesn't actually output true compatibility
information, it's just a demonstration showing what kind of behaviour
would be desirable.

It's aiming to show the part 1 of the workflow described in
scalacenter/sbt-version-policy#179:

> **Keep devs aware of the compatibility of the PR they're working on** : When a PR is opened on a library repository, an automated workflow comments-on or labels the PR, making them aware that _"This PR breaks binary/source compatibility"_ - the information here would come from the `sbt-version-policy` plugin, but wouldn't require setting a `versionPolicyIntention` - it just establishes _what_ the level of compatibility the PR entails, so that the developer is aware. The assumption here is that whatever the developer is doing, they need to do it, and should just know the compatibility cost the PR is going to have (and possibly, though not necessarily, once informed they may be able to modify the PR to improve the compatibility).

The script is written to add-and-remove labels as appropriate, if
the required compatibility label (eg 'Breaks Binary Compatibility') wasn't already
present, we assume this is new information and leave a detailed comment.
In general, to reduce noise, we wouldn't necessarily want to add a new
comment on every push, better to just tell the user how they can get this
information by running locally...
Copy link

Mock info: This PR Breaks Binary Compatibility when compared against most recent release 3.0.0. Details...

@rtyley rtyley merged commit 3e5ba09 into main Nov 29, 2023
2 checks passed
@rtyley rtyley deleted the add-stub-workflow-script-for-compatibility-labelling branch November 29, 2023 16:01

pr_number=$1

required_label="Breaks Binary Compatibility"
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 would be the bit we need to run sbt-version-policy to get the correct value for!

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

Successfully merging this pull request may close these issues.

1 participant