File tree Expand file tree Collapse file tree
actions/require-release-label-or-cc-message Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : ' Require Release Label Conditional'
22description : ' Require release labels on PRs unless title starts with conventional commit prefixes'
3+
4+ inputs :
5+ github-token :
6+ description : ' GitHub token for setting milestones'
7+ required : false
8+ default : ' '
9+
310runs :
4- using : ' node20 '
11+ using : ' node24 '
512 main : ' requireReleaseLabelOrCcMessage.mjs'
Original file line number Diff line number Diff line change @@ -33,14 +33,27 @@ const env = {
3333 */
3434 GITHUB_EVENT_PATH : process . env . GITHUB_EVENT_PATH || '' ,
3535 /** `GITHUB_TOKEN` - GitHub token for API requests */
36- GITHUB_TOKEN : process . env . GITHUB_TOKEN || '' ,
36+ GITHUB_TOKEN :
37+ process . env . INPUT_GITHUB_TOKEN || process . env [ 'INPUT_GITHUB-TOKEN' ] || '' ,
3738 /** `GITHUB_REPOSITORY` - The owner and repository name */
3839 GITHUB_REPOSITORY : process . env . GITHUB_REPOSITORY || '' ,
3940}
4041
4142import fs from 'node:fs'
4243
4344async function main ( ) {
45+ // Debug: Log available environment variables
46+ console . log ( 'Environment variables check:' )
47+ console . log (
48+ 'INPUT_GITHUB_TOKEN:' ,
49+ process . env . INPUT_GITHUB_TOKEN ? 'SET' : 'NOT SET' ,
50+ )
51+ console . log (
52+ 'INPUT_GITHUB-TOKEN:' ,
53+ process . env [ 'INPUT_GITHUB-TOKEN' ] ? 'SET' : 'NOT SET' ,
54+ )
55+ console . log ( 'env.GITHUB_TOKEN:' , env . GITHUB_TOKEN ? 'SET' : 'NOT SET' )
56+
4457 const event = fs . readFileSync ( env . GITHUB_EVENT_PATH , 'utf-8' )
4558
4659 /** @type {GitHubEvent } */
Original file line number Diff line number Diff line change 2929
3030 - name : ✅ Check release label requirement
3131 uses : ./.github/actions/require-release-label-or-cc-message
32+ with :
33+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments