You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2026/09/23 22:08:59 UTC

[PR] Better handling of "no-changelog" label [solr]

janhoy opened a new pull request, #4941:
URL: https://github.com/apache/solr/pull/4941

   The changelog validation used the default `pull_request` event types, so adding the `no-changelog` label after a failed run left the check red until a new commit was pushed. Listen for labeled/unlabeled as well, guarded so that only the `no-changelog` label re-triggers the run.
   
   Setting a label needs repo write access, which contributors do not have. Add a small issue_comment workflow that lets the PR author (or a committer) toggle the label with a `/no-changelog` or `/needs-changelog` comment. It never checks out PR code, only reads the comment payload and calls the labels API.
   
   Also exempt `.github/` changes from requiring a changelog entry, alongside the docs, test and build-file exemptions that already exist.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #4941:
URL: https://github.com/apache/solr/pull/4941#discussion_r4094150030


##########
.github/workflows/validate-changelog.yml:
##########
@@ -12,8 +20,15 @@ concurrency:
 jobs:
   validate-changelog:
     name: Check changelog entry
-    # Skip validation for Renovate PRs (solrbot) - they get changelog entries automatically
-    if: github.event.pull_request.user.login != 'solrbot'
+    # Skip validation for Renovate PRs (solrbot) - they get changelog entries automatically.

Review Comment:
   glad to skip Renovate... but not on the grounds that they have changelog entries already -- I've become unhappy about that.
   
   side comment:  The more we add comments here, the more likely it becomes inaccurate.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #4941:
URL: https://github.com/apache/solr/pull/4941#discussion_r4104081162


##########
.github/workflows/validate-changelog.yml:
##########
@@ -12,8 +20,15 @@ concurrency:
 jobs:
   validate-changelog:
     name: Check changelog entry
-    # Skip validation for Renovate PRs (solrbot) - they get changelog entries automatically
-    if: github.event.pull_request.user.login != 'solrbot'
+    # Skip validation for Renovate PRs (solrbot) - they get changelog entries automatically.

Review Comment:
   Yes, let's deal with renovate and dep changelogs separately from this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #4941:
URL: https://github.com/apache/solr/pull/4941#discussion_r4094135710


##########
dev-docs/changelog.adoc:
##########
@@ -127,7 +127,24 @@ The `validate-changelog` GitHub workflow automatically checks that:
 . **CHANGES.txt is not edited directly** - All changes must use the YAML fragment approach
 . **A changelog entry is added** - Code changes must include a corresponding YAML file in `changelog/unreleased/`
 
-If your change does not require a changelog entry, it is still possible to merge the PR.
+Pull requests that only touch documentation, tests, build files or CI configuration
+are exempt and pass without an entry.

Review Comment:
   ```suggestion
   are exempt and pass without an entry.  Subjectively, some minor changes don't need one either.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy merged PR #4941:
URL: https://github.com/apache/solr/pull/4941


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4941:
URL: https://github.com/apache/solr/pull/4941#discussion_r4087852988


##########
dev-docs/changelog.adoc:
##########
@@ -127,7 +127,23 @@ The `validate-changelog` GitHub workflow automatically checks that:
 . **CHANGES.txt is not edited directly** - All changes must use the YAML fragment approach
 . **A changelog entry is added** - Code changes must include a corresponding YAML file in `changelog/unreleased/`
 
-If your change does not require a changelog entry, it is still possible to merge the PR.
+Pull requests that only touch documentation, tests, build files or CI configuration
+are exempt and pass without an entry.
+
+=== 4.1 Opting out of the changelog requirement
+
+If your change does not require a changelog entry (refactoring, internal cleanup,
+and so on), it is still possible to merge the PR. Mark it by carrying the

Review Comment:
   ```suggestion
   and so on), it is still possible to merge the PR. Mark it by adding the
   ```



##########
.github/workflows/changelog-comment-command.yml:
##########
@@ -0,0 +1,153 @@
+name: Changelog Comment Commands
+
+# Lets a PR author (or any committer) toggle the 'no-changelog' label by
+# commenting on the PR, without needing the repo write access that setting a
+# label directly requires:
+#
+#   /no-changelog     - mark the PR as not needing a changelog entry
+#   /needs-changelog  - undo that
+#
+# The command applies/removes the label, and the label change re-triggers the
+# "Validate Changelog" workflow (which listens for labeled/unlabeled events),
+# so the red check turns green on its own.
+#
+# This workflow deliberately never checks out or executes PR code: it only
+# reads the comment payload and calls the labels API, so running with a
+# write-scoped token is safe.
+on:
+  issue_comment:
+    types:
+      - created
+
+concurrency:
+  group: changelog-comment-command-${{ github.event.issue.number }}
+
+permissions:
+  issues: write        # add/remove labels, add a reaction, post a reply
+  pull-requests: write
+
+jobs:
+  handle-command:

Review Comment:
   OMG i hate the complexity and in ablity to write tests that GHA fosters...  But needs must when the devil drives.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Better handling of "no-changelog" label [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #4941:
URL: https://github.com/apache/solr/pull/4941#discussion_r4087985090


##########
.github/workflows/changelog-comment-command.yml:
##########
@@ -0,0 +1,153 @@
+name: Changelog Comment Commands
+
+# Lets a PR author (or any committer) toggle the 'no-changelog' label by
+# commenting on the PR, without needing the repo write access that setting a
+# label directly requires:
+#
+#   /no-changelog     - mark the PR as not needing a changelog entry
+#   /needs-changelog  - undo that
+#
+# The command applies/removes the label, and the label change re-triggers the
+# "Validate Changelog" workflow (which listens for labeled/unlabeled events),
+# so the red check turns green on its own.
+#
+# This workflow deliberately never checks out or executes PR code: it only
+# reads the comment payload and calls the labels API, so running with a
+# write-scoped token is safe.
+on:
+  issue_comment:
+    types:
+      - created
+
+concurrency:
+  group: changelog-comment-command-${{ github.event.issue.number }}
+
+permissions:
+  issues: write        # add/remove labels, add a reaction, post a reply
+  pull-requests: write
+
+jobs:
+  handle-command:

Review Comment:
   Yes. We could have dispatched to an external "bot" (py script) to do the business logic. But that script would probably be 150 lines as well and would need to acquire a token etc. So guess this is the way to go.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org