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

Integrate fellowship-process-bot #10

Merged
merged 19 commits into from
Sep 7, 2023
Merged

Conversation

rzadp
Copy link
Contributor

@rzadp rzadp commented Sep 6, 2023

This PR integrates the functionality of the fellowship-process-bot action into this repo.

The functionality is to merge (or close) a PR depending on the on-chain referendum.

  • This repo has been renamed from rfc-propose to rfc-action
  • The action has two commands now:
    • /rfc propose, which is the existing functionality of proposing a referendum
    • /rfc process, which processes the on-chain referendum and merges/closes the PR.
  • The demo of the action can be seen here

Co-authored-by: Bryan Chen xlchen1291@gmail.com

@rzadp rzadp requested a review from a team as a code owner September 6, 2023 09:30
errorMessage: `Unable to find the referendum confirm event in the given block.\n\n` + blockHashInstructions,
};
}
if ("approved" in referendum && referendum.approved) {
Copy link

Choose a reason for hiding this comment

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

if we've created an RFC and the hash of .md file is X, but then until it's approved and processed, the hash has been changed (someone pushed some update to file) - then we should check if before merge? and either propose to create a new referendum with a new file hash or roll back to an approved commit, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If some pushes some update and the hash changes, then the referendum will not be found by the action.
It will respond back with a "Unable to find the referendum" message and the PR will not be merged.

Copy link

Choose a reason for hiding this comment

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

ah that makes sense!
if someone pushes the updates to file during ongoing referendum should we do something with it or suggest some actions?

Copy link
Contributor Author

@rzadp rzadp Sep 7, 2023

Choose a reason for hiding this comment

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

Hmm, we would have to check every commit on the PR branch, and if we find one that matches a referendum, that means we detected this situation and can suggest actions (e.g. suggest to roll-back to that commit).

I have created a separate issue for this: #11

```

If you're not sure where to get this block hash,
send a `/rfc process` command and the action will respond with more instructions.
Copy link

Choose a reason for hiding this comment

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

how do people learn about existing commands within repo and its interface?

does it make sense to output this when someone types /rfc or /rfc help or they can head here to README from somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have this little thing responding to /rfc: paritytech-stg/RFCs#9 (comment)

I'll add something for the /rfc help prompt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some instructions: preview 1, preview 2.

@rzadp rzadp merged commit 8d77773 into main Sep 7, 2023
2 checks passed
@rzadp rzadp deleted the rzadp/fellowship-process-bot branch September 7, 2023 19:27
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.

2 participants