Skip to content

Conversation

@michaelvu97
Copy link

Discovered while using this action without a shortcut token:

Run XanaduAI/cloud-actions/[email protected]
Run if [ "$GITHUB_EVENT_NAME" == "pull_request" ]
Branch is 'ci'.
SHA is '70ea076'.
Run SHA="70ea076"
  
gh: Resource not accessible by integration (HTTP 403)
jq: error (at <stdin>:0): Cannot index string with string "number"

Changes

  • Only execute get-pr-number if a shortcut token exists

Mandrenkov
Mandrenkov previously approved these changes Nov 17, 2023
@Mandrenkov Mandrenkov dismissed their stale review November 17, 2023 14:53

Approved too quickly.

Copy link
Contributor

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution proposed in this PR works albeit in an indirect way.

From what I can tell, the issue in the PR description doesn't have anything to do with Shortcut. The error seems to be a permission issue with the GitHub token that is used while running the action. Disabling this step if no Shortcut API token is present is still a reasonable thing to do though since the output of the step is only consumed downstream when a Shortcut API token is provided.

So, while the implementation here may work in the current case, the same issue might crop up again when a Shortcut API token is provided.

@michaelvu97
Copy link
Author

So, while the implementation here may work in the current case, the same issue might crop up again when a Shortcut API token is provided.

Yep makes sense! I ran into this because I didn't want to configure any additional github token settings to be able to get tags. If the shortcut functionality is desired, the token would need to be setup correctly.

@michaelvu97 michaelvu97 merged commit 19f43db into main Nov 20, 2023
@michaelvu97 michaelvu97 deleted the fix-gh branch November 20, 2023 14:27
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.

2 participants