This repository was archived by the owner on Sep 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-26
lines changed
Expand file tree Collapse file tree 2 files changed +7
-26
lines changed Original file line number Diff line number Diff line change 88 welcome :
99 runs-on : ubuntu-latest
1010 steps :
11+ - uses : actions/first-interaction@v1
12+ with :
13+ repo-token : ${{ secrets.GITHUB_TOKEN }}
14+ issue-message : ' # Congratulations :tada:\nThis is your first **Issue**! Welcome to the community :nerd:'
15+ pr-message : ' # Congratulations :tada:\nThis is your first **Pull Request**! Welcome to the community :nerd:'
1116 - uses : EddieJaoudeCommunity/gh-action-community@main
1217 with :
1318 github-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -3,33 +3,9 @@ const github = require('@actions/github');
33
44( async ( ) => {
55 try {
6- const githubSecret = core . getInput ( 'github-token' , { required : true } ) ;
7- const client = new github . GitHub ( githubSecret ) ;
6+ // const githubSecret = core.getInput('github-token', { required: true });
87
9- const creator = github . context . payload . sender . login ;
10- const opts = client . issues . listForRepo ( {
11- ...github . context . issue ,
12- creator,
13- state : 'all' ,
14- } ) ;
15- const issues = await github . paginate ( opts ) ;
16-
17- for ( const issue of issues ) {
18- if ( issue . number === github . context . issue . number ) {
19- continue ;
20- }
21-
22- if ( issue . pull_request ) {
23- return ; // Creator is already a contributor.
24- }
25- }
26-
27- await repo . issues . createComment ( {
28- issue_number : github . context . issue . number ,
29- owner : github . context . github . owner ,
30- repo : github . context . github . repo ,
31- body : 'Welcome, new contributor!' ,
32- } ) ;
8+ console . log ( 'HERE' ) ;
339 } catch ( error ) {
3410 core . setFailed ( error . message ) ;
3511 }
You can’t perform that action at this time.
0 commit comments