- Notifications
You must be signed in to change notification settings - Fork455
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi@joshmgross on: jobs: is |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 3 replies
-
I had the same question. Looking at theGitHub Docs REST API, I figured I could extract it from the This is a sample response present in the docs: {"id":1,"node_id":"MDEyOklzc3VlQ29tbWVudDE=","url":"https://api.github.com/repos/octocat/Hello-World/issues/comments/1","html_url":"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1","body":"Me too","user": {"login":"octocat","id":1,"node_id":"MDQ6VXNlcjE=","avatar_url":"https://github.com/images/error/octocat_happy.gif","gravatar_id":"","url":"https://api.github.com/users/octocat","html_url":"https://github.com/octocat","followers_url":"https://api.github.com/users/octocat/followers","following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","organizations_url":"https://api.github.com/users/octocat/orgs","repos_url":"https://api.github.com/users/octocat/repos","events_url":"https://api.github.com/users/octocat/events{/privacy}","received_events_url":"https://api.github.com/users/octocat/received_events","type":"User","site_admin":false },"created_at":"2011-04-14T16:00:49Z","updated_at":"2011-04-14T16:00:49Z","issue_url":"https://api.github.com/repos/octocat/Hello-World/issues/1347","author_association":"COLLABORATOR"} The following Javascript code gives you the issue_number=issue_url.split('/issues/')[1] |
BetaWas this translation helpful?Give feedback.
All reactions
-
The
|
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hmmm! Maybe that was it then? I was trying |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yeah |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
It's typically easier to use the
One thing to watch out for is multi-line values though - expressions are evaluated and then the script itself is parsed as JavaScript. So it Typically I recommend working around that by passing expression values via the -uses:actions/github-script@v7env:BODY:${{ github.event.comment.body }}with:script:| console.log(process.env.BODY) |
BetaWas this translation helpful?Give feedback.