Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature request: exclude PRs with specific labels from commenting #361

Copy link
Copy link
Closed
@ylemkimon

Description

@ylemkimon
Issue body actions

This is somewhat similar to #359.

There may be some PRs that don't need release comments, such as dependency management and chores. It'd be nice to exclude them by labels like:

--- a/lib/success.js
+++ b/lib/success.js
@@ -28,6 +28,7 @@ module.exports = async (pluginConfig, context) => {
     successComment,
     failComment,
     failTitle,
+    excludeCommentLabels,
     releasedLabels,
     addReleases,
   } = resolveConfig(pluginConfig, context);
@@ -45,7 +46,8 @@ module.exports = async (pluginConfig, context) => {
     const releaseInfos = releases.filter((release) => Boolean(release.name));
     const shas = commits.map(({hash}) => hash);
 
-    const searchQueries = getSearchQueries(`repo:${owner}/${repo}+type:pr+is:merged`, shas).map(
+    const labelQuery = excludeCommentLabels ? excludeCommentLabels.map((label) => `+-label:"${label}"`).join('') : '';
+    const searchQueries = getSearchQueries(`repo:${owner}/${repo}+type:pr+is:merged${labelQuery}`, shas).map(
       async (q) => (await github.search.issuesAndPullRequests({q})).data.items
     );
edemaine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.