I've switched this to use a GitHub app with the Checks API as well.

Instead of a plain link to Artifactory it now gives you a page with a link
per artefact, example:
https://github.com/jenkinsci/jenkins-infra-test-plugin/pull/16/checks?check_run_id=4801158779
https://github.com/jenkinsci/plugin-installation-manager-tool/runs/4795504430

If anyone wants to tweak the messaging or add something like
https://github.com/jenkins-infra/incrementals-publisher/issues/22
The UI code is at:
https://github.com/jenkins-infra/incrementals-publisher/blob/master/lib/github.js#L49-L52


On Wed, 5 Jan 2022 at 18:11, 'Gavin Mogan' via Jenkins Developers <
[email protected]> wrote:

> oh good, it uses ocktokit
>
> https://github.com/jenkins-infra/incrementals-publisher/blob/master/lib/github.js
>
> The code to use an app for ocktokit is pretty straight forward.
>
>   import { createAppAuth } from '@octokit/auth-app';
>   async function getRestClientUncached() {
>     const { data: installations } = await createAppAuth({
>       appId: config.github.appId,
>       privateKey: config.github.privateKey,
>     }).hook(githubRequest.defaults({
>       baseUrl: config.github.server,
>     }), 'GET /app/installations');
>
>     return new Octokit({
>       baseUrl: config.github.server,
>       request: {
>         hook: createAppAuth({
>           appId: config.github.appId,
>           privateKey: config.github.privateKey,
>           installationId: installations[0].id,
>         }).hook,
>       },
>     });
>   }
>
>
> On Wed, Jan 5, 2022 at 9:56 AM Tim Jacomb <[email protected]> wrote:
> >
> > Ah right this was me, I downgraded the old Jenkins-admin users
> permissions from owner as I wanted to find if we still used it anywhere, it
> didn’t really make sense to have 2 bot users with owner permissions
> >
> > Should either switch it to a GitHub app or change the user IMO to the
> other bot one
> >
> > On Wed, 5 Jan 2022 at 17:43, 'Jesse Glick' via Jenkins Developers <
> [email protected]> wrote:
> >>
> >> On Wed, Jan 5, 2022 at 11:45 AM Tim Jacomb <[email protected]>
> wrote:
> >>>
> >>> See
> https://github.com/jenkinsci/incrementals-tools/releases/tag/parent-1.3
> >>
> >>
> >> No, that is unrelated.
> >>
> >> I have also noticed this. The artifact does actually get deployed, e.g.
> >>
> >>
> https://github.com/jenkinsci/prism-api-plugin/pull/2/commits/2b9b1326b405c9cb427d2ca43a4083a89a9e62bf
> >>
> >>
> https://repo.jenkins-ci.org/artifactory/incrementals/io/jenkins/plugins/prism-api/1.25.0-2-rc48.2b9b1326b405/
> >>
> >> and
> https://ci.jenkins.io/job/Plugins/job/prism-api-plugin/job/PR-2/34/console
> claims successful deployment, but no check or commit status is created.
> Presumably missing permission in the publisher? Is there some warning in
> microservice logs?
> >>
> >>
> https://github.com/jenkins-infra/incrementals-publisher/blob/78139813d7e4957aedea0b9840747cef8070b686/IncrementalsPlugin.js#L245
> >>
> >> Also see:
> https://github.com/jenkins-infra/incrementals-publisher/issues/4
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2YqByAC9mDw4ChpnTEoxb%2B_dcSAJdRnV90cNkBEke20Q%40mail.gmail.com
> .
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Biew8%2Be4_5%2B2Cd86-3UobTdhTkubHpst2mqgwebZ6oYCig%40mail.gmail.com
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Duuu-6zw_POR1o%2BKOGv_8A_ugUx-GeafFO_5CWNF%3DT5NMg%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidhCzDd3HnS_yRqp6%3D%2Ba%3DtrqHEwUfRLS21P%2BLKwbc6iJQ%40mail.gmail.com.

Reply via email to