Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ inputs:
github-org-token:
required: false
description: 'Github token with read:org scope to access Apify org members. Needed to map commit authors onto Slack IDs.'
ignore-authors:
required: false
default: 'Copilot,Claude'
description: >-
Comma-separated list of GitHub logins to exclude from the changelog authors (matched case-insensitively).
Applies to both commit authors and `Co-authored-by` trailers.
GitHub bot accounts (type "Bot") are always excluded regardless of this list.
Comment thread
MrkMrk00 marked this conversation as resolved.
outputs:
github-changelog:
description: 'Changelog content in GihHub markdown'
Expand Down
151 changes: 102 additions & 49 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
getReleaseNameInfo,
createGithubReleaseFn,
sendReleaseNotesToSlack,
parseIgnoredAuthors,
} = require('./utils');

/**
Expand All @@ -38,6 +39,7 @@ function alreadyExistsExit(alreadyExists, releaseName) {
* @param {*} context - github action context
* @param {string} baseBranch - base branch/commit to start comparison from
* @param {string} headBranch - head branch/commit to start comparison from
* @param {Set<string>} ignoredAuthors - normalized (lower-cased) logins to exclude from authors
* @returns {Promise<{ changelog: string, authors: array<{ name: string, email: string, login: string }>, includedPrNumbers: number[] }>}
*/
async function createChangelog(
Expand All @@ -47,6 +49,7 @@ async function createChangelog(
context,
baseBranch,
headBranch,
ignoredAuthors = new Set(),
) {
let changelog;
let authors = [];
Expand All @@ -57,13 +60,15 @@ async function createChangelog(
changelog = await getChangelogFromPullRequestDescription(octokit, context);
break;
case 'pull_request_commits':
({ changelog, authors, includedPrNumbers } = await getChangelogFromPullRequestCommits(octokit, scopes, context));
({ changelog, authors, includedPrNumbers } = await getChangelogFromPullRequestCommits(octokit, scopes, context, ignoredAuthors));
break;
case 'pull_request_title':
({ changelog, includedPrNumbers } = await getChangelogFromPullRequestTitle(octokit, scopes, context));
break;
case 'commits_compare':
({ changelog, authors, includedPrNumbers } = await getChangelogFromCompareBranches(octokit, context, baseBranch, headBranch, scopes));
({ changelog, authors, includedPrNumbers } = await getChangelogFromCompareBranches(
octokit, context, baseBranch, headBranch, scopes, ignoredAuthors,
));
break;
default:
core.error(`Unrecognized "changelog-method" input: ${method}`);
Expand All @@ -89,6 +94,7 @@ async function run() {
const slackChannel = core.getInput('slack-channel');
const githubChangelogFileDestination = core.getInput('github-changelog-file-destination');
const fetchAuthorSlackIds = core.getBooleanInput('fetch-author-slack-ids');
const ignoredAuthors = parseIgnoredAuthors(core.getInput('ignore-authors'));

const octokit = github.getOctokit(githubToken);
const context = {
Expand Down Expand Up @@ -127,6 +133,7 @@ async function run() {
context,
baseBranch,
headBranch,
ignoredAuthors,
);

if (createReleasePullRequest) {
Expand Down
Loading
Loading