Skip to content
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

Automate reporting when experimental builds are created by having CI post to an optional open PR/ticket #50

Open
luzpaz opened this issue Aug 5, 2022 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 5, 2022

Thanks to the work of ppd, we now have a more streamlined approach to build experimental builds and test them comfortably.

Re: https://github.com/FreeCAD/FreeCAD-snap/blob/master/docs/index.md#build-snaps-from-freecad-branches-or-forks

Screenshot_20220805_165835

It would be sweet if we could also functionality (add a field to the snap.yaml) that would automate posting the instructions on how to install experimental snaps to a specific ticket or PR. Currently the instructions are posted to the PR that triggers the builds, but someone needs to manually post said instructions elsewhere. I remember that TravisCI has this option where you could specify it to connect to an IRC channel and post it's results. Can we do something less fancy by just posting an open ticket/PR ?

@luzpaz
Copy link
Collaborator Author

luzpaz commented Aug 5, 2022

Hints:

Looks like we need a Personal Access Token + leveraging the github.issues.createComment api call ?

@ppd
Copy link
Collaborator

ppd commented Aug 9, 2022

So you would like those same comments that are posted on the PR in FreeCAD-snap to be posted to some user-specified issue/PR in FreeCAD/FreeCAD, correct?

In that case: yes, you'd need a PAT.

@ppd ppd added enhancement New feature or request good first issue Good for newcomers labels Aug 9, 2022
@ppd
Copy link
Collaborator

ppd commented Sep 6, 2022

@luzpaz do you want to take a crack at it?

@luzpaz
Copy link
Collaborator Author

luzpaz commented Sep 7, 2022

I'll try doing so this week.

@ppd
Copy link
Collaborator

ppd commented Sep 8, 2022

@luzpaz

  • Port issue posting script to GitHub Script v6
  • Copy issue posting script into new action "comment on external issue"
  • introduce env variable that points to a FreeCAD/FreeCAD issue number. Alternative: Put issue number into snapcraft.yaml. Advantages: Only one file to edit, everything is in one place, in theory, the issue number could be read from the snap and displayed somewhere ("This is a test build for issue [the link here]" or similar)
  • add token to secrets
  • Use token in script: https://github.com/actions/github-script#using-a-separate-github-token
  • if issue number is set; then also create a comment on the FreeCAD issue

@luzpaz
Copy link
Collaborator Author

luzpaz commented Sep 23, 2022

Spent sometime researching this and it's out of my scope ATM. Anyone free to take this over?

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

No branches or pull requests

2 participants