-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to the job name? #74
Comments
Was just about to ask the same thing. In a v1 workflow using An example of a v2 workflow using these actions can be seen here and a v1 workflow using them can be seen here. |
Related to #133, #56 We are looking into updating the docs and functionality around creating annotations to make this a smoother experience across the board. The end to end functionality around using problem matchers to create annotations is currently being worked on, and we would recommend you use that approach. That being said, I'll take the feedback around making the job name available back to the team, I could see that being a part of the job context if that feature ends up being added |
Just to clarify "that approach" from what I'm reading on the linked issues:
While the workaround does work (we've used this in a crunch) it definitely creates a confusing experience for everyone on the team. We already have our workflow broken up into several jobs and having these duplicated in our status checks makes it hard to know where to look when a build fails. As we increase complexity in our jobs, being able to have access to the job name or job ID in the job context will become increasingly critical. I appreciate you taking this feedback back to the team -- the types of automations we're able to create going forward would only be possible thanks to the integrated capabilities we get out of Actions and this would be a big barrier into being able to effectively use it to it's fullest extent. |
This is more of a workaround for the current feature set.
We will look into making the job name available in the toolkit. However, we are developing flows to add annotations in the toolkit as a core command, rather then using the octokit library. The main example of this is via the problem-matcher command, but this could extend this to other commands or new commands. Once this functionality is available, we will update the docs in the toolkit on issue #56 with how an action can create annotations. Ideally, once these core command(s) are ready and we have the the back-end is processing these into annotations, our recommendation to create annotations will be using these commands. Please let me know if you have any more questions! Otherwise, I'll go ahead and close out this issue, and we can keep #56 as the primary issue. |
Ahh yes thank you for the clarification. If this is a core command to add notations it would solve all of these concerns. I'll follow along on the other issue and try it out as soon as you have something ready to start testing. |
This was some time ago, and there still don't seem to be any documented ways to use an API to add annotations. Has there been any progress on this? Note: There ARE documented ways on how to add Annotations to a Check-Run/Job, HOWEVER, there are no documented ways to get the current Job/Check-Run ID from within a Job (this is different from the I am surprised this is still missing. ProblemMatchers are fine and all, but they do not allow column or line ranges. Additionally, if we had access to the actual Job ID, we could go so far as to make Review Comments and much more. Why this isn't something we have ready access to is just confusing... |
Current method for getting the job name, in case anyone else lands here:
|
👆 That doesn't work for matrix builds |
I am trying to get access to the user-configured job name so that my custom action can annotate it's own check run.
From documentation and sample code that I've been able to wrangle together I would expect
context.action
to have this value. However, it appears this is only ever the same value:[org-name]actions
no matter the user-configured jobNot sure if this is the best place to ask, but is this the expected return behaviour of
context.action
? Is there any way to get the job name or check run ID within my action so that I can provide annotations?I've been attempting to use the
listForRef
onoctokit.checks
but without acheck_name
I can't reliably assure that my annotation is happening on the correct job, especially if the user has multiple parallel ones configured:The text was updated successfully, but these errors were encountered: