Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 0 additions & 107 deletions .github/fabricbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -1466,112 +1466,5 @@
}
]
}
},
{
"taskSource": "fabricbot-config",
"taskType": "scheduled",
"capabilityId": "ScheduledSearch",
"subCapability": "ScheduledSearch",
"version": "1.1",
"config": {
"taskName": "Lock stale issues and PRs",
"actions": [
{
"name": "lockIssue",
"parameters": {
"reason": "resolved",
"label": "will_lock_this"
}
}
],
"frequency": [
{
"weekDay": 0,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 1,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 2,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 3,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 4,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 5,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
},
{
"weekDay": 6,
"hours": [
1,
7,
13,
19
],
"timezoneOffset": 0
}
],
"searchTerms": [
{
"name": "isClosed",
"parameters": {}
},
{
"name": "noActivitySince",
"parameters": {
"days": 30
}
},
{
"name": "isUnlocked",
"parameters": {}
}
]
}
}
]
36 changes: 36 additions & 0 deletions .github/workflows/locker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Locker - Lock stale issues and PRs
on:
schedule:
- cron: '0 9 * * *' # Once per day, early morning PT

workflow_dispatch:
# Manual triggering through the GitHub UI, API, or CLI
inputs:
daysSinceClose:
required: true
default: "30"
daysSinceUpdate:
required: true
default: "30"

permissions:
issues: write
pull-requests: write

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: "microsoft/vscode-github-triage-actions"
path: ./actions
ref: cd16cd2aad6ba2da74bb6c6f7293adddd579a90e
Copy link
Member

Choose a reason for hiding this comment

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

what's this hash and who updates it?

Copy link
Member

Choose a reason for hiding this comment

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

Seems like this refers to a commit here: microsoft/vscode-github-triage-actions@cd16cd2

I wonder why we use that instead of just tip of the stable branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. Yes, it's the latest commit sha that affected the locker action from the repo. General guidance from GitHub, the VS Code team, and our own infrastructure folks are all aligned that when reusing actions from another repository (that you don't own), you should stick to a specific commit sha rather than a tag/branch. That ensures your repo always references a known state of the action.

Copy link
Member Author

Choose a reason for hiding this comment

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

And as far as who updates it: We would only want/need to update it if the locker action is updated to fix a bug or add a feature that we need. Otherwise, it should stay on this commit sha indefinitely.

Copy link
Member

Choose a reason for hiding this comment

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

My expectation would have been that we take latest, and then there is some bot (like dependabot) that would submit a PR to update it whenever latest changes. Can you file an issue in arcade or core-eng requesting that we have some sort of system for keeping these actions up to date?
Right now this feels like a checked in hardcoded version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Having the checked-in, hardcoded version is the correct thing here, per core-eng and GitHub security guidance, so I'm not sure what such an issue would look to achieve or what problem the checked-in, hardcoded version will cause.

- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run Locker
uses: ./actions/locker
with:
daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }}
daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }}