aboutsummaryrefslogtreecommitdiff
path: root/.github/scripts/unstale.js
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:23:01 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:23:01 +0000
commit142d9041391780ac15b89886a54015fdc5c73995 (patch)
tree0f6b5cac1a60810a03f52826c9e67c9e2780b033 /.github/scripts/unstale.js
parentad86b5db74922285699ab2a1dbb2ff20e6268a33 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-142d9041391780ac15b89886a54015fdc5c73995.tar.gz
rneovim-142d9041391780ac15b89886a54015fdc5c73995.tar.bz2
rneovim-142d9041391780ac15b89886a54015fdc5c73995.zip
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to '.github/scripts/unstale.js')
-rw-r--r--.github/scripts/unstale.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/.github/scripts/unstale.js b/.github/scripts/unstale.js
new file mode 100644
index 0000000000..f645fca5cb
--- /dev/null
+++ b/.github/scripts/unstale.js
@@ -0,0 +1,19 @@
+module.exports = async ({ github, context }) => {
+ const commenter = context.actor;
+ const issue = await github.rest.issues.get({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+ const author = issue.data.user.login;
+ const labels = issue.data.labels.map((e) => e.name);
+
+ if (author === commenter && labels.includes("needs:response")) {
+ github.rest.issues.removeLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ name: "needs:response",
+ });
+ }
+};