aboutsummaryrefslogtreecommitdiff
path: root/.github/scripts/unstale.js
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 17:57:01 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 17:57:01 +0000
commit9837de570c5972f98e74848edc97c297a13136ea (patch)
treecc948611912d116a3f98a744e690d3d7b6e2f59a /.github/scripts/unstale.js
parentc367400b73d207833d51e09d663f969ffab37531 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-9837de570c5972f98e74848edc97c297a13136ea.tar.gz
rneovim-9837de570c5972f98e74848edc97c297a13136ea.tar.bz2
rneovim-9837de570c5972f98e74848edc97c297a13136ea.zip
Merge remote-tracking branch 'upstream/master' into colorcolchar
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",
+ });
+ }
+};