-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot updates shouldn't count as "regular" updates #506
Comments
The point was raised here already #441 (comment), but you did good to open a dedicated issue to track this. Yes, for the time being you can disable the option, or you can also use the stable stale action by using the last release instead of the main one. |
Since the logic is based on the @luketomlinson any suggestion would be welcome! |
@luketomlinson can you reverse it so that nobody has an issue? I know that people should not use the main branch so, but it would be better to think this through and take the time to provide a good workaround. |
test('processing an issue unstale that should be stale should not unstale and should keep the stale label added', async () => {
expect.assertions(3);
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
daysBeforeStale: 7,
daysBeforeClose: 7,
staleIssueMessage: 'Message',
staleIssueLabel: 'stale',
removeStaleWhenUpdated: true,
removeStaleWhenCommented: true
};
const now: Date = new Date();
const updatedAt: Date = new Date(now.setDate(now.getDate() - 8));
const createdAt: Date = new Date(now.setDate(now.getDate() - 9));
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A real issue example; see https://github.com/actions/stale/issues/441#issuecomment-860820600',
updatedAt.toDateString(),
createdAt.toDateString(),
false,
[],
false,
false
)
];
const processor = new IssuesProcessorMock(
opts,
async () => 'abot',
async p => (p === 1 ? TestIssueList : []),
async (): Promise<IComment[]> => Promise.resolve([]),
async () => new Date().toDateString()
);
// process our fake issue list
await processor.processIssues(1);
expect(processor.staleIssues).toHaveLength(1);
expect(processor.addedLabelIssues).toHaveLength(1);
expect(processor.closedIssues).toHaveLength(0);
}); |
@luketomlinson thanks and sorry for the troubles. |
Thanks heaps @C0ZEN and @luketomlinson for dealing with this! |
Describe your issue
It seems that the updates that the stale bot applies to an issue do count as regular updates so we end up assigning and soon afterward removing the
stale
label, for example.Your stale action configuration
My repository is https://github.com/robotology/icub-tech-support whose workflow is the following:
Further context
I got my hunch by looking at what happened for example to a particular issue: see robotology/icub-tech-support#1096 (comment).
Here's below the corresponding action log:
From the log, we can extract the following two relevant info:
Found this issue last updated at: 2021-06-13T08:05:32Z
Issue marked stale on: 2021-06-13T08:05:32Z
Clearly, the update time matches the time when the issue was marked as stale and as such the stale label gets removed.
For the time being, I'll be trying to use the param
remove-stale-when-updated: false
to get around this, although I think bot updates shouldn't count as regular updates.Am I missing something?
The text was updated successfully, but these errors were encountered: