jenkins-infra / jenkins-io-components

https://jenkins-io-components.netlify.app
MIT License
4 stars 25 forks source link

fix(reportaproblem): Switch to GH issue form syntax #72

Closed NotMyFault closed 1 year ago

NotMyFault commented 1 year ago

This PR adapts the GitHub issue form syntax. problem matches the unique ID, I gave the issue field this information should be filled in to. The default body can be removed by now because I incorporated it into the issue form default.

This PR depends on the following jenkins.io PR: https://github.com/jenkins-infra/jenkins.io/pull/6086

halkeye commented 1 year ago

Can you make it a boolean attribute so other sites like plugins or accounts can opt in when they are setup. (At this point I feel like plugins shouldn't really have this link but that's a seperate item)

NotMyFault commented 1 year ago

No idea why the build is failing, nor do I know what storybook is.

Although replacing jenkins-infra/jenkins-io-components with NotMyFault/jenkins.io-issue-forms creates the desired output url: https://github.com/NotMyFault/jenkins.io-issue-forms/issues/new?labels=bug&template=4-bug.yml&problem=%5Bthingie%5D%28https%3A%2F%2Fgoogle.com%2F%29+page%2C+src%2Fstories%2FReportAProblem.ts

lemeurherve commented 1 year ago

No idea why the build is failing

I'll take a look this afternoon if I have the time to.

what storybook is

https://github.com/storybookjs/storybook & https://storybook.js.org, allow to get a preview with frontend debug tools included

lemeurherve commented 1 year ago

No idea why the build is failing, nor do I know what storybook is.

Transient network error:

[2023-02-27T13:24:18.120Z] npm ERR! code ECONNRESET [2023-02-27T13:24:18.120Z] npm ERR! syscall read [2023-02-27T13:24:18.120Z] npm ERR! errno -104 [2023-02-27T13:24:18.120Z] npm ERR! network read ECONNRESET [2023-02-27T13:24:18.120Z] npm ERR! network This is a problem related to network connectivity. [2023-02-27T13:24:18.120Z] npm ERR! network In most cases you are behind a proxy or have bad network settings. [2023-02-27T13:24:18.120Z] npm ERR! network [2023-02-27T13:24:18.120Z] npm ERR! network If you are behind a proxy, please make sure that the [2023-02-27T13:24:18.120Z] npm ERR! network 'proxy' config is set properly. See: 'npm help config'

I've restarted a build, it's now failing on the tests still checking if there is a title in the resulting URL:

halkeye commented 1 year ago

yea most of the tests will fail

lemeurherve commented 1 year ago

npx test-storybook --maxWorkers=2 --coverage --junit --ci FAIL browser: chromium src/stories/ReportAProblem.stories.ts ● Example/ReportAProblem › RepoAndSourcePath › play-test

page.evaluate: StorybookTestRunnerError: 
An error occurred in the following story. Access the link for full output:
http://127.0.0.1:6321/iframe.html?path=/story/example-reportaproblem--repo-and-source-path&addonPanel=storybook/interactions/panel

Message:
 expect(received).toContain(expected) // indexOf

Expected substring: "title=example-reportaproblem--repo-and-source-path+page"
Received string:    "https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bexample-reportaproblem--repo-and-source-path%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--repo-and-source-path%26viewMode%3Dstory%29+page%2C+src%2Fstories%2FReportAProblem.ts"

--------------------------------------------------

Browser logs:

error: {"matcherResult":{"message":"expect(received).toContain(expected) // indexOf\n\nExpected substring: \"title=example-reportaproblem--repo-and-source-path+page\"\nReceived string:    \"https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bexample-reportaproblem--repo-and-source-path%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--repo-and-source-path%26viewMode%3Dstory%29+page%2C+src%2Fstories%2FReportAProblem.ts\"","pass":false}}

  at Object.<anonymous> (<anonymous>:174:13)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1829
      at Array.forEach (<anonymous>)
  at Channel.handleEvent (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1813)
  at handler (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:901)
  at Channel.emit (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:956)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11249
  at StoryRender.runPhase (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:8736)
  at StoryRender.render (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11195)
  at testFn (src/stories/ReportAProblem.stories.ts:83:37)
  at Object.<anonymous> (src/stories/ReportAProblem.stories.ts:104:17)

● Example/ReportAProblem › NoSourcePath › play-test

page.evaluate: StorybookTestRunnerError: 
An error occurred in the following story. Access the link for full output:
http://127.0.0.1:6321/iframe.html?path=/story/example-reportaproblem--no-source-path&addonPanel=storybook/interactions/panel

Message:
 expect(received).toContain(expected) // indexOf

Expected substring: "title=example-reportaproblem--no-source-path+page"
Received string:    "https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bexample-reportaproblem--no-source-path%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--no-source-path%26viewMode%3Dstory%29+page"

--------------------------------------------------

Browser logs:

error: {"matcherResult":{"message":"expect(received).toContain(expected) // indexOf\n\nExpected substring: \"title=example-reportaproblem--no-source-path+page\"\nReceived string:    \"https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bexample-reportaproblem--no-source-path%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--no-source-path%26viewMode%3Dstory%29+page\"","pass":false}}

  at Object.<anonymous> (<anonymous>:174:13)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1829
      at Array.forEach (<anonymous>)
  at Channel.handleEvent (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1813)
  at handler (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:901)
  at Channel.emit (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:956)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11249
  at StoryRender.runPhase (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:8736)
  at StoryRender.render (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11195)
  at testFn (src/stories/ReportAProblem.stories.ts:189:37)
  at Object.<anonymous> (src/stories/ReportAProblem.stories.ts:210:17)

● Example/ReportAProblem › OverridePageTitle › play-test

page.evaluate: StorybookTestRunnerError: 
An error occurred in the following story. Access the link for full output:
http://127.0.0.1:6321/iframe.html?path=/story/example-reportaproblem--override-page-title&addonPanel=storybook/interactions/panel

Message:
 expect(received).toContain(expected) // indexOf

Expected substring: "title=thingie+page"
Received string:    "https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bthingie%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--override-page-title%26viewMode%3Dstory%29+page%2C+src%2Fstories%2FReportAProblem.ts"

--------------------------------------------------

Browser logs:

error: {"matcherResult":{"message":"expect(received).toContain(expected) // indexOf\n\nExpected substring: \"title=thingie+page\"\nReceived string:    \"https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bthingie%5D%28http%3A%2F%2F127.0.0.1%3A6321%2Fiframe.html%3Fid%3Dexample-reportaproblem--override-page-title%26viewMode%3Dstory%29+page%2C+src%2Fstories%2FReportAProblem.ts\"","pass":false}}

  at Object.<anonymous> (<anonymous>:174:13)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1829
      at Array.forEach (<anonymous>)
  at Channel.handleEvent (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1813)
  at handler (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:901)
  at Channel.emit (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:956)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11249
  at StoryRender.runPhase (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:8736)
  at StoryRender.render (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11195)
  at testFn (src/stories/ReportAProblem.stories.ts:242:37)
  at Object.<anonymous> (src/stories/ReportAProblem.stories.ts:263:17)

● Example/ReportAProblem › OverrideURL › play-test

page.evaluate: StorybookTestRunnerError: 
An error occurred in the following story. Access the link for full output:
http://127.0.0.1:6321/iframe.html?path=/story/example-reportaproblem--override-url&addonPanel=storybook/interactions/panel

Message:
 expect(received).toContain(expected) // indexOf

Expected substring: "title=thingie+page"
Received string:    "https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bthingie%5D%28https%3A%2F%2Fgoogle.com%2F%29+page%2C+src%2Fstories%2FReportAProblem.ts"

--------------------------------------------------

Browser logs:

error: {"matcherResult":{"message":"expect(received).toContain(expected) // indexOf\n\nExpected substring: \"title=thingie+page\"\nReceived string:    \"https://github.com/jenkins-infra/jenkins-io-components/issues/new?labels=bug&template=4-bug.yml&problem=%5Bthingie%5D%28https%3A%2F%2Fgoogle.com%2F%29+page%2C+src%2Fstories%2FReportAProblem.ts\"","pass":false}}

  at Object.<anonymous> (<anonymous>:174:13)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1829
      at Array.forEach (<anonymous>)
  at Channel.handleEvent (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:1813)
  at handler (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:901)
  at Channel.emit (http:/127.0.0.1:6321/sb-preview/runtime.mjs:5:956)
  at http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11249
  at StoryRender.runPhase (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:8736)
  at StoryRender.render (http:/127.0.0.1:6321/sb-preview/runtime.mjs:67:11195)
  at testFn (src/stories/ReportAProblem.stories.ts:295:37)
  at Object.<anonymous> (src/stories/ReportAProblem.stories.ts:316:17)
halkeye commented 1 year ago

@NotMyFault when i get a minute (probably tomorrow), i'll polish this up (unless you rather)

NotMyFault commented 1 year ago

You’re welcome to go ahead and polish things!

On 1. Mar 2023, at 01:25, Gavin Mogan @.***> wrote:

@NotMyFault https://github.com/NotMyFault when i get a minute (probably tomorrow), i'll polish this up (unless you rather)

— Reply to this email directly, view it on GitHub https://github.com/jenkins-infra/jenkins-io-components/pull/72#issuecomment-1449128251, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGDOVI7XHCOC2TT643Y4O3WZ2JPBANCNFSM6AAAAAAVIWCA5Q. You are receiving this because you were mentioned.

halkeye commented 1 year ago

Okay! https://deploy-preview-72--jenkins-io-components.netlify.app/?path=/story/example-footer--jenkins-io-bug-template is done. Backwards compatible and storybooked and stuff.

NotMyFault commented 1 year ago

Okay! https://deploy-preview-72--jenkins-io-components.netlify.app/?path=/story/example-footer--jenkins-io-bug-template is done. Backwards compatible and storybooked and stuff.

Oh, we have previews of that? Neat!

halkeye commented 1 year ago

Oh, we have previews of that? Neat!

yea! each project i integrate it with, the easier the next one becomes.

jenkins-io-components[bot] commented 1 year ago

:tada: This PR is included in version 1.19.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: