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

ci: Ensure sponsors are alphabetical (at the same tier) #14469

Closed

Conversation

issyl0
Copy link
Contributor

@issyl0 issyl0 commented Aug 13, 2024

  • I got bored of manually fixing the 2024 London sponsors data when I noticed it was non-alphabetical and had already been on the website for a bit with the logos not in order (one, two).
  • So here's a minimum viable CI check that runs whenever someone edits an event YAML file.
  • It checks that the sponsors are sorted alphabetically by ID at each tier.

Example (events/2024/test/main.yml):

sponsors:
  - id: Elephant
    level: platinum
  - id: Aardvark
    level: gold
  - id: Zebra
    level: gold
  - id: Fish
    level: gold
  - id: Cat
    level: silver
  - id: Dog
    level: silver

would output:

Gold sponsors in events/2024/test/main.yml are not sorted alphabetically by ID.

and so the user would change the "gold" sponsors ordering to the following, to fix the error:

  - id: Aardvark
    level: gold
  - id: Fish
    level: gold
  - id: Zebra
    level: gold

I considered fixing the ordering in-place and pushing a commit to the user's PR, but fork PRs don't have a lot of permissions and I'm too tired to think about it seriously on top of organizing an actual conference, so that can maybe be a stretch goal for later.

@issyl0 issyl0 requested a review from a team as a code owner August 13, 2024 20:30
Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for devopsdays-web ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9f779dc
🔍 Latest deploy log https://app.netlify.com/sites/devopsdays-web/deploys/66bbc439113d0100082d2187
😎 Deploy Preview https://deploy-preview-14469--devopsdays-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

- I got bored of manually fixing the 2024 London sponsors
  data when I noticed it was non-alphabetical.
- So here's a CI check that runs whenever someone edits
  an event YAML file.
- It checks that the sponsors are sorted alphabetically by
  ID at each tier.

Example (events/2024/test/main.yml):

```yaml
sponsors:
  - id: Elephant
    level: platinum
  - id: Aardvark
    level: gold
  - id: Zebra
    level: gold
  - id: Fish
    level: gold
  - id: Cat
    level: silver
  - id: Dog
    level: silver
```

would output:

```text
Gold sponsors in events/2024/test/main.yml are not sorted alphabetically by ID.
```

and so the user would change the "gold" sponsors ordering
to the following, to fix the error:

```yaml
  - id: Aardvark
    level: gold
  - id: Fish
    level: gold
  - id: Zebra
    level: gold
```

I considered fixing the ordering in-place and pushing a commit to the
user's PR, but fork PRs don't have a lot of permissions and I'm too
tired to think about it seriously on top of organizing an actual
conference, so that can maybe be a stretch goal for later.
@issyl0 issyl0 force-pushed the check-alphabetization-of-sponsors branch from 88accea to cd01884 Compare August 13, 2024 20:35
@toshywoshy
Copy link
Contributor

While this may be esthecailly correct and good for us as humans, but I do not see the need for us to enfore this.

HugoIO will sort by weight, alphabetically or a ordered, we do not need to that
This is what HugoIO does on the front end for us, as it takes the YAML file and parses that according to our programming.
We use ordered listing, which means that sponsor are listed as per the order in the YAML file.
An event has the option to do alphabetical or FIFO or LIFO.
Eache event is free to chose, we, Belgium prefer FIFO, from left to right, while London may prefer alphabetically and so you can do so.

@mattstratton
Copy link
Member

I agree… I don’t think that the code should enforce the order of the sponsors, for example, for Chicago, we tend to put them in the order that they paid/signed up as sponsors, and I don’t think that I would want the code to override the order that I wanted

@issyl0
Copy link
Contributor Author

issyl0 commented Aug 13, 2024

Thanks for the feedback, both!

We use ordered listing, which means that sponsor are listed as per the order in the YAML file.

Yep, which is why I feel that the order should be alphabetical in the YAML file so that it appears so on the website. My overall thinking for alphabetical was that it "flows" nicely within the tiers, and also that every sponsor within a tier is (theoretically) equal because they paid the same money so alphabetical enforces that in a way.

Eache event is free to chose, we, Belgium prefer FIFO, from left to right, while London may prefer alphabetically and so you can do so.

I see. I didn't realise that the differences were per-event, I guess I thought people just added new sponsors to the end of the list because it was easier. Lucky you to not be perturbed by the logos being out of order like I am. ;-)

But really it doesn't matter, it's just a small nit and each event should retain autonomy, as you say, so I'll close this. Thanks again!

@issyl0 issyl0 closed this Aug 13, 2024
@issyl0 issyl0 deleted the check-alphabetization-of-sponsors branch August 13, 2024 21:20
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.

3 participants