Skip to content

Commit 7ce108c

Browse files
exodus-neo[bot]exodus-neoexo-mv
authored
fix: don't fail release on assignee errors (#81)
GitHub App installation tokens cannot assign bots/apps via the REST `addAssignees` endpoint — the call rejects with "Assigning agents is not supported with GitHub App installation tokens." When a `Version` workflow runs under an app-issued token and the actor is itself a bot (e.g. `exodus-neo[bot]`), the assignee defaults to that bot and the whole release fails — even though the PR is otherwise created. Wrap `addAssignees` in `.catch(core.warning)` to match the precedent already in place for `requestReviewers` (#80) and `enablePullRequestAutoMerge`. PR adornment is best-effort and shouldn't fail the release. Co-authored-by: exodus-neo <exodus-neo@users.noreply.github.com> Co-authored-by: Mark <exo-mv@users.noreply.github.com>
1 parent cb423bc commit 7ce108c

5 files changed

Lines changed: 23 additions & 9 deletions

File tree

dist/publish/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/publish/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/version/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/version/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/github.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,17 @@ export async function createPullRequest({
6969

7070
if (assignees) {
7171
promises.push(
72-
client.rest.issues.addAssignees({
73-
...repo,
74-
issue_number: response.data.number,
75-
assignees,
76-
})
72+
client.rest.issues
73+
.addAssignees({
74+
...repo,
75+
issue_number: response.data.number,
76+
assignees,
77+
})
78+
.catch((error) => {
79+
core.warning(
80+
`Failed to assign users: ${unwrapErrorMessage(error, 'for unknown reasons')}`
81+
)
82+
})
7783
)
7884
}
7985

0 commit comments

Comments
 (0)