forked from SurajPratap10/Imagine_AI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: combine lock and greetings workflow to enhance functionality
Signed-off-by: Abdul Khalid <[email protected]>
- Loading branch information
1 parent
4c40314
commit 973696a
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Lock Issue with Greetings | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Add Comment | ||
uses: actions/github-script@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { issue } = context.payload; | ||
const author = issue.user.login; | ||
const issueNumber = issue.number; | ||
const comment = `Hello @${author}! \n Thank you for raising this issue. \n\nPlease make sure to follow our [Contributing Guidelines.](https://github.com/SurajPratap10/Imagine_AI/blob/main/CONTRIBUTING-GUIDELINES.md) \nDon't forget to ⭐ our [Imagine AI.](https://github.com/SurajPratap10/Imagine_AI) \n\nOur review team will carefully assess the issue and reach out to you soon!\n We appreciate your patience!`; | ||
const { owner, repo } = context.repo; | ||
await github.issues.createComment({ | ||
owner: owner, | ||
repo: repo, | ||
issue_number: issueNumber, | ||
body: comment | ||
}); | ||
- name: Lock Issue | ||
uses: dessant/repo-lockdown@v3 | ||
with: | ||
close-issue: false | ||
process-only: "issues" | ||
issue-labels: "🔒 locked" | ||
exclude-issue-labels: "gssoc23" | ||
skip-closed-issue-comment: true | ||
issue-comment: > | ||
To reduce notifications, issues are locked. Your issue will be unlocked when we add the label, `gssoc23`. |