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

updated library to use PAPI #11

Merged
merged 20 commits into from
Mar 15, 2024
Merged

updated library to use PAPI #11

merged 20 commits into from
Mar 15, 2024

Conversation

Bullrich
Copy link
Collaborator

@Bullrich Bullrich commented Mar 14, 2024

Migrated from @polkadot/api to @polkadot-api/api after watching @josepot's video.

All the code entry points are still the same. So are the tests.

This resolves #9

@Bullrich Bullrich added the dependencies Pull requests that update a dependency file label Mar 14, 2024
@Bullrich Bullrich self-assigned this Mar 14, 2024
@Bullrich Bullrich requested a review from a team as a code owner March 14, 2024 09:47
@Bullrich Bullrich linked an issue Mar 14, 2024 that may be closed by this pull request
Copy link
Collaborator Author

@Bullrich Bullrich left a comment

Choose a reason for hiding this comment

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

Added a couple of notes

src/fellows.ts Outdated Show resolved Hide resolved
Comment on lines +107 to 108
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
if (!additional || additional.length < 1) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't trust that this will always not be null, so I'll keep the check from before

@@ -4,6 +4,8 @@ WORKDIR /action

COPY package.json yarn.lock ./

COPY collectives.scale relay.scale polkadot-api.json ./
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dependencies for the postinstall script

Thank you @kratico for providing a fix so quickly!
5 minutes should be enough. By default it runs for 6 hours
It was reported in polkadot-api/polkadot-api#327 that PAPI does not exit correctly.

Until this is fixed, we need to add this parameter
@Bullrich Bullrich requested a review from a team March 14, 2024 13:22
src/fellows.ts Outdated Show resolved Hide resolved
Until polkadot-api/polkadot-api#327 is fixed, we need to manually exit the process
@Bullrich Bullrich merged commit 4aaf650 into main Mar 15, 2024
8 checks passed
@Bullrich Bullrich deleted the papi branch March 15, 2024 14:31
fellowship-merge-bot bot added a commit to polkadot-fellows/runtimes that referenced this pull request Mar 18, 2024
This upgrade contains the change in paritytech/auto-merge-bot#25 which
fixes the problem with unstable branches.

## The problem

When the `/merge` command is triggered on a PR that still can't be
merge, the bot enables auto-merge.

**But**, when the command is run when the PR is ready to merge, the
action will fail to enable auto-merge (this is expected).

We evaluate the error message, and if it says that the PR is clean, it
simply merges the PR.

But, we did not handle `unstable` PRs.

An unstable PR is a PR that _can be merged, but a **non required status
check is failing**._

So, if a user invoked the `/merge` command on a PR that was ready to
merge, but a not-required status check was failing, it would crash.

This upgrade fixes this problem.

### Other upgrades

#### `get-fellows-action` has been upgraded to `1.1.0`

This new version contains:
- paritytech/get-fellows-action#15
  - Fixed a bug where candidates (`rank 0`) counted as fellows.
  - Now we filter anyone whose rank is below 1.
- paritytech/get-fellows-action#16
- Fixes a problem where a fellow using a superidentity wouldn't appear.
- This is a particular case that I discovered with @joepetrowski not
appearing as a fellow.
- This error was also encountered in review bot and fixed in
paritytech/review-bot#107
- paritytech/get-fellows-action#11
  - We upgraded the system to work with `papi` and with `smoldot`.
  - We are **bleeding edge** now!


#### replaced token generation script for github's

We replaced the action used to generate a token from a github app,
originally `tibdex/github-app-token` for
`actions/create-github-app-token`

It is more safe to use an action that has been developed by github
themselves than by an external party.

---

- [x] Does not require a CHANGELOG entry

---------

Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert pjs -> papi
4 participants