Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Commit 8e25300

Browse files
authored
Auto close new issues
Auto close new issues and direct users to the new STF - Session Android repo
1 parent 854ad89 commit 8e25300

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Auto Close issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
close_issue_from_unwhitelisted:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check issue author and act
12+
uses: actions/github-script@v6
13+
with:
14+
github-token: ${{ secrets.GITHUB_TOKEN }}
15+
script: |
16+
// Define your whitelist of allowed users here:
17+
const whitelist = ['KeeJef'];
18+
19+
const issueAuthor = context.payload.issue.user.login;
20+
21+
// If the user is not in the whitelist, comment and close the issue
22+
if (!whitelist.includes(issueAuthor)) {
23+
// Post a comment directing them to the new repository
24+
await github.rest.issues.createComment({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
issue_number: context.issue.number,
28+
body: "Hi @"+issueAuthor+", thanks for opening an issue, this repository is now deprecated. However, Session Android is still actively developed [here](https://github.com/session-foundation/session-android). This is in line with announcements from [Session](https://getsession.org/blog/introducing-the-session-technology-foundation) and the [OPTF](https://optf.ngo/blog/the-optf-and-session), indicating that the OPTF has handed over the stewardship of the Session Project to the [Session Technology Foundation](https://session.foundation), a Swiss-based foundation dedicated to advancing digital rights and innovation. Please reopen your issue in the new repo: [here](https://github.com/session-foundation/session-android/issues)."
29+
});
30+
31+
// Close the issue
32+
await github.rest.issues.update({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
issue_number: context.issue.number,
36+
state: 'closed'
37+
});
38+
}

0 commit comments

Comments
 (0)