File tree Expand file tree Collapse file tree 3 files changed +116
-0
lines changed Expand file tree Collapse file tree 3 files changed +116
-0
lines changed Original file line number Diff line number Diff line change 1+ name : New community
2+ description : Submit a community non listed yet for angular-hub.com/communities
3+ title : ' [New Community]: '
4+ body :
5+ - type : input
6+ id : name
7+ attributes :
8+ label : Community name
9+ validations :
10+ required : true
11+ - type : dropdown
12+ id : type
13+ attributes :
14+ label : Community main activity
15+ options :
16+ - conference
17+ - meetup
18+ validations :
19+ required : true
20+ - type : input
21+ id : location
22+ attributes :
23+ label : Location
24+ description : <City>, <Country> format expected if any
25+ - type : input
26+ id : url
27+ attributes :
28+ label : Community preferred website
29+ - type : input
30+ id : logo
31+ attributes :
32+ label : Logo URL
33+ description : >-
34+ optional, can be provided as an image on a pull request for better
35+ quality
36+ - type : input
37+ id : twitter
38+ attributes :
39+ label : Twitter
40+ - type : input
41+ id : linkedin
42+ attributes :
43+ label : LinkedIn
44+ - type : input
45+ id : callforpapers
46+ attributes :
47+ label : Call For Papers URL
48+ description : encouraged as a way to get more speakers
49+ - type : markdown
50+ attributes :
51+ value : >-
52+ This template was generated with [Issue Forms
53+ Creator](https://issue-forms-creator.netlify.app)
Original file line number Diff line number Diff line change 1+ name : Add community
2+ on :
3+ issues :
4+ types :
5+ - labeled
6+ permissions :
7+ contents : write
8+ issues : write
9+ concurrency : ' main'
10+ jobs :
11+ add_community :
12+ if : github.event.label.name == 'community-approved'
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 20'
20+
21+ - uses : stefanbuck/github-issue-praser@v3
22+ id : issue-parser
23+ with :
24+ template-path : .github/ISSUE_TEMPLATE/add-community.yml
25+
26+ - run : echo '${{ steps.issue-parser.outputs.jsonString }}' > add-community.json
27+
28+ - run : cat add-community.json
29+
30+ - run : node ./scripts/add-community.js
31+
32+ - name : Commit changes
33+ shell : bash
34+ run : |
35+ git config --global user.email "github-actions[bot]@users.noreply.github.com" && \
36+ git config --global user.name "github-actions[bot]" && \
37+ git add angular-hub/src/public/assets/data/community.json && \
38+ git commit -m 'Add community' && \
39+ git push
40+
41+ - uses : peter-evans/close-issue@v1
42+ with :
43+ comment : ' Community added: thanks for your contribution!'
Original file line number Diff line number Diff line change 1+ const fs = require ( 'fs' ) ;
2+ const community = require ( './../add-community.json' ) ;
3+
4+ let communityRaw = fs . readFileSync (
5+ './angular-hub/src/public/assets/data/community.json' ,
6+ ) ;
7+ let communityData = JSON . parse ( communityRaw ) ;
8+ let json = JSON . stringify (
9+ [
10+ ...communityData ,
11+ {
12+ ...community ,
13+ events : [ ] ,
14+ } ,
15+ ] ,
16+ null ,
17+ 2 ,
18+ ) ;
19+
20+ fs . writeFileSync ( './angular-hub/src/public/assets/data/community.json' , json ) ;
You can’t perform that action at this time.
0 commit comments