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

Development config #123

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Development config #123

merged 1 commit into from
Oct 8, 2024

Conversation

whilefoo
Copy link
Member

@whilefoo whilefoo commented Oct 7, 2024

Resolves #122

@whilefoo
Copy link
Member Author

whilefoo commented Oct 7, 2024

Btw @0x4007 I don't have any permissions in the new orgs

@@ -143,7 +144,7 @@ async function download({ context, repository, owner }: { context: GitHubContext
const { data } = await context.octokit.rest.repos.getContent({
owner,
repo: repository,
path: CONFIG_FULL_PATH,
path: context.eventHandler.environment === "production" ? CONFIG_FULL_PATH : DEV_CONFIG_FULL_PATH,
Copy link
Member

@0x4007 0x4007 Oct 7, 2024

Choose a reason for hiding this comment

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

Do you think we should define the strings and import them for implementation?

export const environments = {
  PRODUCTION: "production",
  DEVELOPMENT: "development"
};

Although this can probably be done cleaner with some type of as const or enum

Copy link
Member Author

Choose a reason for hiding this comment

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

I could add an enum to make it look better === Environment.PRODUCTION but the type is already defined as "development" | "production" so it's already type safe

@0x4007
Copy link
Member

0x4007 commented Oct 7, 2024

Btw @0x4007 I don't have any permissions in the new orgs

I've been re-adding collaborators on an as-needed basis. Let me know which repo(s) you need elevated permissions for!

@whilefoo
Copy link
Member Author

whilefoo commented Oct 7, 2024

I've been re-adding collaborators on an as-needed basis. Let me know which repo(s) you need elevated permissions for!

It would be nice to have ability to request reviews, merge PRs, add labels

@@ -12,6 +12,15 @@ import { shouldSkipPlugin } from "../src/github/handlers";
config({ path: ".dev.vars" });

const issueOpened = "issues.opened";
const manifestPath = "manifest.json";
const repo = {
owner: { login: "ubiquity" },
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
owner: { login: "ubiquity" },
owner: { login: "ubiquity-os-marketplace" },

@0x4007 0x4007 merged commit bd10839 into ubiquity-os:development Oct 8, 2024
3 checks passed
@gentlementlegen
Copy link
Member

Shouldn't it default to "production"? Also, the .dev.vars.example has not been updated.

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.

Config (dev/prod) Environment Switch
3 participants