Skip to content

Filter gitlab objects with functions #178

Description

@iamrgroot

I think it would be really nice to remove the settings for skipping item states and replace them with filter functions.

Now:

  skipMergeRequestStates: string[];
  skipMatchingComments: string[];

Suggested:

  skipIssue: (issue: GitLabIssue) => boolean;
  skipMergeRequest: (mr: GitLabMergeRequest) => boolean;
  skipNotes: (note: GitLabNote) => boolean;
  skipMilestone: (note: GitLabMilestone) => boolean;

An example config could be:

  skipMergeRequest: (mr: GitLabMergeRequest) => ['merged', 'closed'].includes(mr.state),
  skipIssue: (issue: GitLabIssue) => {
    if (!issue.closed_at) {
      return false;
    }

    return (new Date(issue.closed_at)).getFullYear() < 2023;
  },

Activity

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

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