File tree Expand file tree Collapse file tree 8 files changed +708
-0
lines changed
Expand file tree Collapse file tree 8 files changed +708
-0
lines changed Original file line number Diff line number Diff line change 1+ # Editor configuration, see http://editorconfig.org
2+ root = true
3+
4+ [* ]
5+ charset = utf-8
6+ indent_style = space
7+ indent_size = 2
8+ insert_final_newline = true
9+ trim_trailing_whitespace = true
10+
11+ [* .md ]
12+ max_line_length = off
13+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change 1+ node_modules
2+ .idea
Original file line number Diff line number Diff line change 1+ # Create release notes - Github action
2+
3+ A [ GitHub Action] ( https://github.com/features/actions ) to extract jira tickets from commits and generate release notes.
4+
5+ ## Usage
6+
7+ 1 . Create a ` .github/workflows/generate-notes.yml ` file in your GitHub repo.
8+ 2 . Add the following code to the ` generate-notes.yml ` file.
9+
10+ ``` yml
11+ on :
12+ pull_request :
13+ types :
14+ - opened
15+ - synchronize
16+ - reopened
17+ - ready_for_review
18+ branches :
19+ - master
20+
21+ jobs :
22+ attach :
23+ runs-on : ubuntu-18.04
24+
25+ steps :
26+ - uses : actions/checkout@v2
27+ with :
28+ fetch-depth : 0
29+
30+ - name : Generate branch diff file
31+ if : success()
32+ run : |
33+ echo "Head branch: ${GITHUB_HEAD_REF}"
34+ echo "Base branch: ${GITHUB_BASE_REF}"
35+ git log origin/${GITHUB_BASE_REF}..origin/${GITHUB_HEAD_REF} > ./branch-diff.txt
36+
37+ - name : Generate release notes
38+ if : success()
39+ uses : juztcode/create-release-notes@1.0.0
40+ with :
41+ branch-diff-file : ./branch-diff.txt
42+ jira-project-key : TEST
43+ jira-url : " https://ustocktrade.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10907"
44+ ` ` `
45+
46+ ## Inputs
47+
48+ Input | Purpose
49+ ------------------|---------------------------------------------------------------------------------------------------------------------------------------
50+ branch-diff-file | File contains commit message difference between head and base branches.
51+ jira-project-key | Jira project key used to extract ticket ids from commit message (TEST key will detect all ticket ids with pattern TEST-<num>).
52+ jira-url | Jira url to use when generating create release ticket link.
53+
54+ ## Outputs
55+
56+ Output | Purpose
57+ ------------------|---------------------------------------------------------------------------------------------------------------------------------------
58+ release-notes | Generated release notes.
Original file line number Diff line number Diff line change 1+
2+ name : ' Create release notes'
3+ description : ' A github action to create release notes'
4+ author : ' randomizer<randil.fernando@outlook.com>'
5+ runs :
6+ using : ' node12'
7+ main : ' dist/index.js'
8+ inputs :
9+ branch-diff-file :
10+ description : ' The branch diff file'
11+ required : true
12+ jira-project-key :
13+ description : ' The jira project key'
14+ required : true
15+ jira-url :
16+ description : ' The jira create release url'
17+ required : false
18+ outputs :
19+ release-notes :
20+ description : ' Generated release notes string'
You can’t perform that action at this time.
0 commit comments