Skip to content

Only consider dependency bot pull request that are over 90days old#652

Merged
alecharp merged 9 commits into
jenkins-infra:mainfrom
darinpope:feature/651
Jun 2, 2025
Merged

Only consider dependency bot pull request that are over 90days old#652
alecharp merged 9 commits into
jenkins-infra:mainfrom
darinpope:feature/651

Conversation

@darinpope

Copy link
Copy Markdown
Collaborator

Description

Closes #651.

When you take a closer look, you'll see we are checking against the start of day 90 days ago. However, the tests aren't getting that close. I'm just checking for 91 days. I'm going to think about a few more tests, but this covers what I think we are looking for.

Testing done

mvn clean verify

Submitter checklist

  • If an issue exists, it is well described and linked in the description
  • The description of this pull request is detailed and explain why this pull request is needed
  • The changeset is on a specific branch. Using feature/ for new feature, or improvements ; Using fix/ for bug fixes ; Using docs/ for any documentation changes.
  • If required, the documentation has been updated
  • There is automated tests to cover the code change / addition or an explanation why there is no tests in the description.

@alecharp alecharp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do also have a problem locally running the tests. As discussed, I believed it's because of concurrent access of the method getCreateAt() which is a bridged method.
I'm investigating.

@alecharp alecharp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found out that the doReturn|when pattern is for spies, true but here it is used for mocks.

As for the WithBridgeMethod, it introduces a method for binary compatibility but it does not make the annotated method use the generated method.

Using

        when(pr.getCreatedAt()).thenReturn(someDaysAgo);

should be working without any problem.

@alecharp alecharp changed the title resolve Increase validity period for dependency pull request bots #651 Only consider dependency bot pull request that are over 90days old May 6, 2025
@darinpope

Copy link
Copy Markdown
Collaborator Author

I'm confused why you think that when/thenReturn should be working. I've made the other changes.

@darinpope darinpope left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I covered all the issues. Once I upgraded github-api to 2.0-rc.3, everything started working in CI and local. However, I did not refactor to match the work being done in #569 since this is passing.

@alecharp alecharp marked this pull request as ready for review May 28, 2025 15:31
@alecharp alecharp enabled auto-merge (squash) June 2, 2025 11:38
@alecharp alecharp added the enhancement New feature or request label Jun 2, 2025
@alecharp alecharp merged commit 0329e38 into jenkins-infra:main Jun 2, 2025
19 checks passed
@darinpope darinpope deleted the feature/651 branch June 2, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase validity period for dependency pull request bots

2 participants