Comments (8)
The user who last committed the cron schedule will be the user who the github context runs as. Unfortunately, at this time we don't have a better association method so if you're doing this as "yourself" you have three options:
- run the action as "you" and you will not get the un-staling feature
- turn off un-staling (this will revert to the previous behavior where nothing gets un-staled -- although I think this is the worst option)
- use an alternate account to commit the cron change which does not participate in the repo
Hope that helps @fjeremic @william76
I am going to close this issue since I don't think there is any action on the stale side (but let me know if there is something we need to address).
from stale.
Looking at the source code here is the logic which dictates whether the stale label should be removed:
Lines 210 to 216 in b6f9559
From the above snippet it relies on the logic here:
Lines 251 to 255 in b6f9559
Note that the "updated" comments are filtered to those not made by either a bot, or the user which triggered the action. Since you are the owner of that repository the action runs under your user context. You can see this in the debug output above:
Comments not made by william76 or another bot: 0
This means the action is counting no new comments and it does not remove the stale label. This is by intention. To show that the action should remove the stale label if some other user comments I've gone ahead and added a comment in william76/workflowTest#1. @william76 if you can trigger the bot again we can test if the stale label will be removed.
from stale.
@fjeremic Ah, ok. I triggered the workflow on that issue and it removed the STALE flag on my test issue...
So to clarify what you're saying... The bot will only clear the STALE label if the user that makes the comment is not the same as who 'triggered' the bot?
I'm pretty new to exploring workflows in GitHub and don't quite follow what counts as the user that triggered the action. Is it just because I own the repo so anytime it's triggered it's considered to run under my context?
Is there a way to change what 'user' it's running as? or would the workflow always essentially run as me?
Would it be possible for the workflow to have a setting that would change this behavior so that it ignores activity by the bot but does not ignore activity by the repo owner?
from stale.
So to clarify what you're saying... The bot will only clear the STALE label if the user that makes the comment is not the same as who 'triggered' the bot?
That's right.
Is it just because I own the repo so anytime it's triggered it's considered to run under my context?
That's also correct.
Is there a way to change what 'user' it's running as?
Would it be possible for the workflow to have a setting that would change this behavior so that it ignores activity by the bot but does not ignore activity by the repo owner?
As far as I know, no there is no way to change that. The code in question was introduced in #73 to fix a valid problem.
from stale.
Thanks for the quick responses! I really appreciate the assistance 😄
I saw that happening in #18 where the bot would put the stale label on and then remove it... I'm not sure that the right approach is to make the bot ignore any changes made by the owner of the repository though. To me that's really an unexpected behavior. If I set a workflow on a repository that I own... I don't expect it to ignore my contributions.
I suppose the workaround could be to create an entity account on Github and make the workflow use that entity accounts token but Github used to disallow 2nd accounts. This may have changed since MSFT took them over though, I haven't looked at those policies in the past year or two. I can try it and see if that does anything. That policy was really annoying to me in the past since it makes more sense to have a personal account for my personal stuff and a work account for my work-related activities.
In any case, I imagine this kind of workflow isn't really targeted at a single user repo but rather more for a larger team... which is exactly what I'm evaluating it for. We have a project with > 100 developers and about 6.5M lines of code and > 1k issues and we're looking into workflows that could take care of some of the administrivia such as dealing with abandoned issues :p If the solution is to just have the workflow run off an entity then that could be something we can use... but I will have to test it on my test repo 😄
from stale.
Perhaps @hross can shed some light under which user context cron actions run on. It doesn't seem clear cut to me looking at the actions in the eclipse/omr repo. It seems it runs under different user contexts, all of whom have write access to the repository. I'm not sure how exactly it is decided though.
from stale.
@hross ok. I will add that this behavior seems quite odd to me -- that one needs to know that they must use an alternate account (which used to violate GitHub TOS) to make the commit to the workflow file since that dictates who GitHub runs the workflow as, or it won't remove the stale flag is really nonobvious to me and smells like a huge side-effect. It may be an obvious thing to those who work with GitHub workflows alot, but for people like myself who are starting an evaluation of them it's not.
I would ask that you guys clearly document this in your README.md file. My initial reporting of this workflow to my project leads is that it is unstable and isn't worth pursuing any further. Normally that would be it, so I'm glad I put in this issue as it's been informative. I will test the workflow again with a separate 'bot' account to see what happens and update my assessment to my team leads if it works out.
Thanks for the responses :)
from stale.
I would +1 that this is extremely confusing behaviour
However also seeing the stale
label not removed on issues where people other than myself have commented such as pouchdb/pouchdb#8196
from stale.
Related Issues (20)
- Eser4444 HOT 1
- Eser4444 HOT 1
- How to run for other repos in the same organization HOT 3
- Feature request: Option to move a PR from "open" to "draft" HOT 2
- Stale workflow fails to override cache. HOT 4
- Stale label not removed after receiving comments/commit HOT 5
- Error delete _state: [403] Resource not accessible by integration HOT 8
- Stale issues are not getting closed HOT 5
- State restoration fails if a repo has many caches HOT 3
- Have one workflow ignore the state saved by another HOT 3
- [wishlist
- [wishlist] mark previous comment(s) as outdated when removing 'stale' label HOT 1
- Allow filtering of PRs by review status or other criteria HOT 2
- Support markdown comments HOT 1
- Action is not working and is always erroring out HOT 3
- Actions fails if rate Limit is not enabled HOT 2
- `actions: write` is too permissive HOT 1
- Feature request: Close draft PRs only HOT 1
- Github actions workflow issue for long running jobs - Not able to view Logs & status marked as cancelled but overall workflow seems to be running HOT 4
- Error when removing the label: "Label does not exist" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stale.