danger-packwerk tries to drop in an inline comment on the constant in a deprecated_refrences.yml file.
That constant is often part of the visible diff if the user is adding a new violation. However, if they are adding a new reference to an existing violation and there are enough existing referencing files to push that constant out of the diff, danger-packwerk will not post the inline comment (since Github does not permit inline comments on lines that are not part of the visible diff). As a result, it does not comment silently.
Here are some other possible solutions:
1) We could drop it as a comment on the top-level PR. I don’t love this solution though
2) If there are existing references to the constant, I can drop the comment on the first new file that references the constant, rather than on the constant itself. This is probalby the simplest solution.
danger-packwerk
tries to drop in an inline comment on the constant in a deprecated_refrences.yml file.That constant is often part of the visible diff if the user is adding a new violation. However, if they are adding a new reference to an existing violation and there are enough existing referencing files to push that constant out of the diff, danger-packwerk will not post the inline comment (since Github does not permit inline comments on lines that are not part of the visible diff). As a result, it does not comment silently.
Here are some other possible solutions: 1) We could drop it as a comment on the top-level PR. I don’t love this solution though 2) If there are existing references to the constant, I can drop the comment on the first new file that references the constant, rather than on the constant itself. This is probalby the simplest solution.