nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 55 forks source link

add ability to add contributor information to html pages (#1254) #1299

Closed RussBerg closed 1 year ago

RussBerg commented 1 year ago

Ok I finally have all the code changes made to accomplish what was talked about, The contributors are listed left to right most recent to oldest, mouse over gives name and date of last commit and clicking avatar takes you to that persons github profile.

Also added is the link to create a new github issue in the get help link.

Image

A github access token is required to retrieve the contributor information from the github API and this token is passed in the environment variable GH_TOKEN. During the codecamp @mkuehbach sent me an example of how they do it in fairmat https://github.com/FAIRmat-NFDI/nexus-fairmat-proposal/blob/main/.github/workflows/update-proposal-webpage.yml

So it looks like what we need can be achieved in jenkins by wrapping the line:

https://github.com/nexusformat/definitions/blob/2635a440a5d7cb0e521526a553116a9bc7aa0be0/jenkins_build#L30

like this?

withEnv(['GH_TOKEN=secrets.GITHUB_TOKEN']) {
         // Then call to build docs
         ( cd ../impatient-guide && rm -rf _build && make latexpdf && make html )

     }

please @prjemian could you check me on this closes #1254

prjemian commented 1 year ago

@RussBerg Sorry, I won't have time to review in the next day or so. Perhaps someone else can review? I re-assigned to the NeXus developers

RussBerg commented 1 year ago

@PeterC-DLS are you familiar with the jenkins stuff to hazard a guess on how to pull the github access token from "secrets" and add it to the environment?

PeterC-DLS commented 1 year ago

Yes, I can adjust the workflow to populate the environment running the build with the token. Note, the CI is failing as there are files not formatted correctly.

PeterC-DLS commented 1 year ago

See this change https://github.com/nexusformat/definitions/blob/76d84d6f56900b2a4c24020474f5c4e41d8f1025/.github/workflows/ci.yaml#L55-L56 and add it to https://github.com/nexusformat/definitions/blob/83498e7fbd02ed4eea664b9c37fef4e43a3b5498/.github/workflows/ci.yaml#L72

PeterC-DLS commented 1 year ago

Sorry, I clicked the wrong button!

PeterC-DLS commented 1 year ago

Does the CI GH token allow access to GH's REST API? If not, I could set an specific access token for this purpose

RussBerg commented 1 year ago

yes the url that I am passing the token to in github.py uses the REST API endpoint