semantic-release / semantic-release/github

Feature request: precheck more permissions needed by other steps in verify step

Open
#895 14 comments 1 reaction 0 assignees View on GitHub

A pull request for this has already been merged.

  • #897 by @jedwards1211 — merged
Dominant language
JavaScript
Stars
534
Forks
150
Avg merge
1m
Merged PRs (30d)
3

Description

Related to #738, it would be good to try to verify that we have as many of the necessary GitHub permissions as possible before running other steps. For example, publish can succeed but then adding issue comments can fail during the success step; then adding those comments manually is the only option. But if we could detect the lack of permissions and error out on the verify step, then the user can fix their token and rerun, and the issue comments will be created successfully after publish.

As I mentioned in #738:

What I've found out so far is:

Maybe we can check permission to update issues and releases by doing a no-op update on one (sending the title it already has in an update, etc), I will have to experiment. But we'd be able to avoid hacky workarounds if the GitHub API provided an explicit way to check if we have permissions to do a certain operation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the verify step and the later publish and success steps described in the issue. Reproduce the listed permission checks and investigate GitHub API behavior for push, issue, and release updates; done means verify detects required permissions before later steps can partially succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, javascript
Domain
api, authorization, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.