Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Add PR number to Github instances and show PR link in the Web UI. #4

Merged
merged 2 commits into from
Sep 14, 2015

Conversation

smarnach
Copy link
Contributor

No description provided.

| <a href="{{ selected.instance.github_pr_url }}" target="_new">PR#{{ selected.instance.github_pr_number }}</a>
{% endif %}
</li>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

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

@smarnach Is that showing up correctly on your development environment? This template isn't interpreted by the Django templating language, it uses the angular syntax, so {% if ... %} won't work - it shows this for me:

screenshot-localhost 5000-2015-09-12-08-53-20

Instead you need to use the ng-if directive, like in https://github.com/open-craft/opencraft/blob/smarnach/add-pr-link/instance/static/html/instance/index.html#L33

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh dear, apparently I was quite tired on Friday night. :) As mentioned in the PR description, I had some trouble getting the development server running. I'll give it another try and send an update.

EDIT: Argh, I just noticed that there is no PR description, since I only clicked the "Preview" button. Anyway, the development server now works for me and the comments there have become irrelevant.

Copy link
Member

Choose a reason for hiding this comment

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

@smarnach : )

Out of curiosity, what were the issues you had to setup the dev environment? If there are some gotchas other might run into, it could be worth adding a note or fixing them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antoviaque The problems were mostly with myself, not with the instructions in the README. The README could be a bit more detailed on what to put in the .env file and which settings actually need useful values to get the development server running. (I simply copied .env.test, removed the -test suffix from the database name and ran createdb opencraft, which is probably the fastest way of getting a somewhat working setup.)

Copy link
Member

Choose a reason for hiding this comment

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

@smarnach Yup, that seem like good instructions to add to the README - starting from the test environment can get things to start. For having everything working, there is not really a way around going through the configuration file, and setting the right values/creating the right accounts. Configuration seem a recurring pain point, you're not the first one to mention it - but not sure how to do much better than this.

@smarnach
Copy link
Contributor Author

@antoviaque I pushed a fix for the issues you mentioned. This time I verified it myself, since I now have a working development server. :)

@antoviaque
Copy link
Member

@smarnach Thanks for the fixes! Looks good now to me 👍

smarnach added a commit that referenced this pull request Sep 14, 2015
Add PR number to Github instances and show PR link in the Web UI.
@smarnach smarnach merged commit 8a4ce6f into master Sep 14, 2015
"""
if self.github_pr_number is None:
return None
return '{0.github_base_url}/pull/{0.github_pr_number}'.format(self)
Copy link
Member

Choose a reason for hiding this comment

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

@smarnach I just realized, testing on the real set of sandboxes, that there is a bug here - github_base_url is the base URL of the repo being deployed - not the repo the PR is opened on. This works well when they are the same, but not when the PR is opened from a fork.

This should be using settings.WATCH_FORK or - likely better since we'll eventually watch mutiple forks - store the full PR URL instead of just the number. Since this is already merged and the ticket closed, I'll add a ticket in the backlog about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, darn, of course. Yes, adding the full URL seems like the best solution until we have some more complete PR model.

@smarnach smarnach deleted the smarnach/add-pr-link branch August 22, 2017 17:07
xirdneh added a commit that referenced this pull request Jun 30, 2019
# This is the 1st commit message:

Re-writing circle.yml to store code coverage in CircleCI's workspace and
collect them afterwards. Test run parallelization is used with
environment variables instead of using custom test runner.

# This is the commit message #2:

Update Makefile message.

# This is the commit message #3:

Remove cov.html from cov.combine.

# This is the commit message #4:

Stop running all tests in all containers

# This is the commit message #5:

Cleanup
xirdneh added a commit that referenced this pull request Jun 30, 2019
# This is the 1st commit message:

Re-writing circle.yml to store code coverage in CircleCI's workspace and
collect them afterwards. Test run parallelization is used with
environment variables instead of using custom test runner.

# This is the commit message #2:

Update Makefile message.

# This is the commit message #3:

Remove cov.html from cov.combine.

# This is the commit message #4:

Stop running all tests in all containers

# This is the commit message #5:

Cleanup

# This is the commit message #6:

Experiment with different IDs for each coverage report

# This is the commit message #7:

Gathering raw coverage from all steps

# This is the commit message #8:

Always copy coverage and log message when not found

# This is the commit message #9:

Log copying raw coverage files for debugging
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants