-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
144 lines (139 loc) · 5.71 KB
/
action.yml
File metadata and controls
144 lines (139 loc) · 5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CFF Author Updater
description: Add GitHub and raw commit authors to the authors section of CITATION.cff and post a pull request comment with updated CFF and qualifying contributions from new authors.
inputs:
github_token:
description: GitHub token for API access
required: true
type: string
base_branch:
description: The base branch to compare against (target of PR)
required: true
type: string
head_branch:
description: The head branch (source of PR)
required: true
type: string
cff_path:
description: Path to the CFF file (default is CITATION.cff)
required: false
type: string
default: CITATION.cff
post_pr_comment:
description: Whether to post a pull request comment (true/false)
required: false
type: boolean
default: true
show_error_messages_in_pr_comment:
description: Whether to show error messages in pull request comment (true/false)
required: false
type: boolean
default: true
show_warning_messages_in_pr_comment:
description: Whether to show warning messages in pull request comment (true/false)
required: false
type: boolean
default: true
show_info_messages_in_pr_comment:
description: Whether to show info messages in pull request comment (true/false)
required: false
type: boolean
default: true
authorship_for_pr_commits:
description: Include PR commit authors and co-authors as authors
required: false
type: boolean
default: true
authorship_for_pr_reviews:
description: Include PR reviewers as authors
required: false
type: boolean
default: true
authorship_for_pr_issues:
description: Include creators of issues linked to the PR as authors
required: false
type: boolean
default: true
authorship_for_pr_issue_comments:
description: Include commenters on linked issues as authors
required: false
type: boolean
default: true
authorship_for_pr_comments:
description: Include users who comment directly on the PR as authors
required: false
type: boolean
default: true
missing_author_invalidates_pr:
description: Invalidate pull request if a new author is missing from the CFF file
type: boolean
default: true
duplicate_author_invalidates_pr:
description: Invalidate the pull request if there is a duplicate author in the CFF file
type: boolean
default: true
invalid_cff_invalidates_pr:
description: Invalidate the pull request if cffconvert fails to validate the CFF file
type: boolean
default: true
can_skip_authorship:
description: Whether manually skipping and unskipping authorship is enabled or not
type: boolean
default: true
bot_blacklist:
description: 'Comma-separated list of bot usernames to ignore'
required: false
default: 'github-actions[bot]'
outputs:
new_authors:
description: New authors and qualifying contributions in JSON
original_cff:
description: Full original CFF content in YAML
original_cff_is_valid_cff:
description: Whether the original CFF file has valid CFF according to cffconvert ('true' or 'false')
updated_cff:
description: Full updated CFF content in YAML. If no changes, this will be the same as the original CFF file.
updated_cff_is_valid_cff:
description: Whether the updated CFF file has valid CFF according to cffconvert ('true' or 'false')
updated_cff_has_error:
description: Whether the updated CFF file has an error ('true' or 'false'). An error invalidates the pull request.
updated_cff_has_warning:
description: Whether the updated CFF file has an error ('true' or 'false'). A warning does not invalidate the pull request.
error_log:
description: Log that contains errors about the CFF author update process.
warning_log:
description: Log that contains warnings about the CFF author update process.
info_log:
description: Log that contains general information about the CFF author update process.
debug_log:
description: Log that contains debug information about the CFF author update process.
runs:
using: "composite"
steps:
- name: Install action with pip
run: pip install --force-reinstall ${{ github.action_path }} # the --force-reinstall avoids caching issues from external dependencies which may rely on this action
shell: bash
- name: Update CFF authors
id: update_cff_authors
run: cff-author-updater
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
REPO: ${{ github.repository }}
BASE_BRANCH: ${{ inputs.base_branch }}
HEAD_BRANCH: ${{ inputs.head_branch }}
CFF_PATH: ${{ inputs.cff_path }}
POST_PR_COMMENT: ${{ inputs.post_pr_comment }}
SHOW_ERROR_MESSAGES_IN_PR_COMMENT: ${{ inputs.show_error_messages_in_pr_comment }}
SHOW_WARNING_MESSAGES_IN_PR_COMMENT: ${{ inputs.show_warning_messages_in_pr_comment }}
SHOW_INFO_MESSAGES_IN_PR_COMMENT: ${{ inputs.show_info_messages_in_pr_comment }}
AUTHORSHIP_FOR_PR_COMMITS: ${{ inputs.authorship_for_pr_commits }}
AUTHORSHIP_FOR_PR_REVIEWS: ${{ inputs.authorship_for_pr_reviews }}
AUTHORSHIP_FOR_PR_ISSUES: ${{ inputs.authorship_for_pr_issues }}
AUTHORSHIP_FOR_PR_ISSUE_COMMENTS: ${{ inputs.authorship_for_pr_issue_comments }}
AUTHORSHIP_FOR_PR_COMMENTS: ${{ inputs.authorship_for_pr_comments }}
MISSING_AUTHOR_INVALIDATES_PR: ${{ inputs.missing_author_invalidates_pr }}
DUPLICATE_AUTHOR_INVALIDATES_PR: ${{ inputs.duplicate_author_invalidates_pr }}
INVALID_CFF_INVALIDATES_PR: ${{ inputs.invalid_cff_invalidates_pr }}
CAN_SKIP_AUTHORSHIP: ${{ inputs.can_skip_authorship }}
BOT_BLACKLIST: ${{ inputs.bot_blacklist }}
GITHUB_EVENT_PATH: ${{ github.event_path }}