Skip to content

Conversation

@hoffie
Copy link
Member

@hoffie hoffie commented Aug 22, 2022

Short description of changes

The bump-dependencies workflow got permission errors from the Github API when trying to edit existing PRs which had already been added to an organization project.
The reason for this is that the GITHUB_TOKEN of the run is scoped to the repo, but gh edit tries to fetch all fields of a PR which includes the inaccessible organization project field. Therefore, use gh api instead which can be used in a more fine-grained
way.

This PR also addresses @ann0see's request to mimic the dependabot commit message style.

Group with:
CHANGELOG: Internal: Enabled automated dependency updates via dependabot and custom automation

Context: Fixes an issue?

Fixes: #2777 (comment)
Fixes: #2787 (comment)

Does this change need documentation? What needs to be documented and how?

No.

Status of this Pull Request

Ready.

What is missing until this pull request can be merged?
Reviews.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

The workflow got permission errors from the Github API when trying to
edit existing PRs which had already been added to an organization
project.
The reason for this is that the GITHUB_TOKEN of the run is scoped to the
repo, but `gh edit` tries to fetch all fields of a PR which includes the
inaccessible organization project field.
Therefore, use `gh api` instead which can be used in a more fine-grained
way.

Fixes: jamulussoftware#2777 (comment)
@hoffie hoffie added this to the Release 3.9.1 milestone Aug 22, 2022
@hoffie hoffie requested a review from ann0see August 22, 2022 21:09
@hoffie hoffie changed the title Github: Fix bump-dependencies runs on existing PRs Github: Fix bump-dependencies runs on existing PRs & adjust title Aug 22, 2022
@hoffie hoffie requested a review from pljones August 25, 2022 19:49
@hoffie hoffie merged commit 7dcdffe into jamulussoftware:master Aug 28, 2022
@hoffie hoffie deleted the fix-bump-dependencies-perms branch August 28, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants