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

chore(workflow): action to create pr in rnj #130

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

SBub
Copy link
Contributor

@SBub SBub commented Sep 27, 2021

Description

This workflow will create a PR in react-native-jolocom repo when new updates are pushed to master. The assumption is that when we make a new release we merge things to master (we should actually sync about it). The only role of this action is to pass inputs to the underlying action SBub/create-outside-pr, which is adopted fork of another repo that creates PR using gh cli. create-outside-pr action looks at the package.json of the repo where the action was triggered, reads its name and version and creates PR in destination repo (in this case react-native-jolocom) in the format: chore/bump-$PACKAGE_NAME-$PACAKGE_VERSION-$timestamp with valid title and description.

Purpose

Let react-native-jolocom know when updates happened to its jolocom ssi dependencies

Further steps

We would have to use this action for jolocom-lib and sdk-storage repos, so this action can be further abstracted

This PR in react-native-jolocom was generated with this action.

@SBub SBub self-assigned this Sep 27, 2021
destination_repo: 'jolocom/react-native-jolocom'
destination_base_branch: 'master'
user_name: 'SBub'
user_email: '[email protected]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this must be impersonated somehow...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100%, i.e. we have jolocom-dev user that can serve such a purpose

uses: SBub/[email protected]

env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every devs must have such key with all exposed rights to pass this job? can it be impersonated as well? for example with jolocom dev acc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the API_TOKEN_GITHUB is a secret of the jolocom-sdk the action reads it from there

Copy link
Contributor

@clauxx clauxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we have the check on the react-native-jolocom package instead of here, since this would have to be replicated for the jolocom-lib, jolocom typeorm, etc. ? Instead, we can maybe have an action on the rnj package which checks if any of these dependencies updated, and if they did, it would create a PR with either a minor or major update on rnj. For instance, there is this action https://github.com/marketplace/actions/dependencies-autoupdate which can be responsible for auto updating our jolocom dependencies and can create a PR in that case.

@serg-temchenko
Copy link
Contributor

Can't we have the check on the react-native-jolocom package instead of here, since this would have to be replicated for the jolocom-lib, jolocom typeorm, etc. ? Instead, we can maybe have an action on the rnj package which checks if any of these dependencies updated, and if they did, it would create a PR with either a minor or major update on rnj. For instance, there is this action https://github.com/marketplace/actions/dependencies-autoupdate which can be responsible for auto updating our jolocom dependencies and can create a PR in that case.

Good point 👍 . It looks like can be reached by 'Scheduled event' which will be triggered once a day for example to not overload CI...

Copy link
Contributor

@mnzaki mnzaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • move the action itself to a repo under jolocom
  • rebase branch on main after force push
  • use jolocom-dev credentials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants