Skip to content

feat: Output Run ID#2

Merged
simplypixi merged 2 commits intobugbug-io:masterfrom
jhkersul:feature/output-run-id
May 23, 2024
Merged

feat: Output Run ID#2
simplypixi merged 2 commits intobugbug-io:masterfrom
jhkersul:feature/output-run-id

Conversation

@jhkersul
Copy link
Contributor

@jhkersul jhkersul commented May 17, 2024

Why? 🤔

Hello everyone! How are you? For my test scenario, I need to have access to the suiteRunId or testRunId to generate a link for the test executed. So I added two new possible outputs: suiteRunId and testRunId

How? 🧑‍💻

  • Capturing the execution output on a variable and checking if has suiteRunId or testRunId
  • Sending values to the $GITHUB_OUTPUT variable
  • It also captures the original status that BugBug Cli resulted and exits with that status

Result 🔢

  • You can access the outputs through steps.<step-name>.outputs.suiteRunId or steps.<step-name>.outputs.testRunId
Screenshot 2024-05-17 at 17 46 10

@jhkersul jhkersul force-pushed the feature/output-run-id branch 15 times, most recently from c6c7d40 to 057131b Compare May 17, 2024 20:43
@jhkersul jhkersul marked this pull request as ready for review May 17, 2024 20:46
@jhkersul jhkersul force-pushed the feature/output-run-id branch from 057131b to 16b3e08 Compare May 17, 2024 21:33
@simplypixi simplypixi added enhancement New feature or request good first issue Good for newcomers phase:review labels May 20, 2024
@simplypixi
Copy link
Contributor

simplypixi commented May 21, 2024

Hi @jhkersul !
First of all, thank you for the PR. <3

The code seems to be fine in general :)
I left you one small comment.

@simplypixi
Copy link
Contributor

@jhkersul I wonder if I might ask you another question, apart from the PR. Do you really need those outputs? You run specific suite/test using this gh-action, so you have direct access to suiteId/testId.

I think it's a good idea to return some extra data as action output, but I'm just wondering whether there's a particular reason you need those outputs.

@jhkersul
Copy link
Contributor Author

@jhkersul I wonder if I might ask you another question, apart from the PR. Do you really need those outputs? You run specific suite/test using this gh-action, so you have direct access to suiteId/testId.

I think it's a good idea to return some extra data as action output, but I'm just wondering whether there's a particular reason you need those outputs.

I do have access to the suiteId/testId, but I don't have access to the suiteRunId and testRunId 🤔

My use case: I run my E2E Tests during PR phase, and after the tests run, I comment on the PR with the result of the test, with a link to the report (this link needs the Run ID)

Example:
image

The link is like:
https://app.bugbug.io/organizations/<ORG_ID>/projects/<PROJECT_ID>/runs-history/suites/${suiteRunId}/

@simplypixi
Copy link
Contributor

@jhkersul I wonder if I might ask you another question, apart from the PR. Do you really need those outputs? You run specific suite/test using this gh-action, so you have direct access to suiteId/testId.
I think it's a good idea to return some extra data as action output, but I'm just wondering whether there's a particular reason you need those outputs.

I do have access to the suiteId/testId, but I don't have access to the suiteRunId and testRunId 🤔

Oh, that's right. Sorry for the misunderstanding. 😅

My use case: I run my E2E Tests during PR phase, and after the tests run, I comment on the PR with the result of the test, with a link to the report (this link needs the Run ID)

Sounds like a great idea for a new optional feature to implement directly in the action 👍

@simplypixi simplypixi merged commit e046aad into bugbug-io:master May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants